We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 46d7bf4 + 4ce9da1 commit 2e3c326Copy full SHA for 2e3c326
src/Module.php
@@ -47,8 +47,6 @@ public function register(): void
47
{
48
// Register this module in the repository
49
app(ModuleRepositoryContract::class)->register($this->getModuleNamespace(), $this->getModulePath());
50
-
51
- $this->registerCommands();
52
}
53
54
/**
@@ -60,8 +58,12 @@ public function register(): void
60
58
*/
61
59
public function boot(): void
62
63
- $this->loadCommandSchedule();
64
- $this->loadMigrations();
+ if ($this->app->runningInConsole()) {
+ $this->registerCommands();
+ $this->loadCommandSchedule();
+ $this->loadMigrations();
65
+ }
66
+
67
$this->loadViews();
68
$this->loadTranslations();
69
$this->loadConfigs();
0 commit comments