diff --git a/src/Providers/AddonServiceProvider.php b/src/Providers/AddonServiceProvider.php index f1a78c7717..4f6f96102e 100644 --- a/src/Providers/AddonServiceProvider.php +++ b/src/Providers/AddonServiceProvider.php @@ -345,7 +345,7 @@ protected function bootPolicies() protected function bootCommands() { - if ($this->app->runningInConsole()) { + if ($this->app->isBooted() && $this->app->runningInConsole()) { $commands = collect($this->commands) ->merge($this->autoloadFilesFromFolder('Commands', Command::class)) ->merge($this->autoloadFilesFromFolder('Console/Commands', Command::class))