Skip to content

Commit 70caca9

Browse files
committed
Added extra check before registering publish command
1 parent a48e728 commit 70caca9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/HashidsServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function setupConfig(Application $app)
4242
{
4343
$source = realpath(__DIR__.'/../config/hashids.php');
4444

45-
if (class_exists('Illuminate\Foundation\Application', false)) {
45+
if (class_exists('Illuminate\Foundation\Application', false) && $app->runningInConsole()) {
4646
$this->publishes([$source => config_path('hashids.php')]);
4747
} elseif (class_exists('Laravel\Lumen\Application', false)) {
4848
$app->configure('hashids');

0 commit comments

Comments
 (0)