优化commands只有在Cli模式下注入
This commit is contained in:
parent
db18e71906
commit
929f9b2a75
@ -43,11 +43,13 @@ class CatchAdminService extends Service
|
|||||||
*/
|
*/
|
||||||
protected function registerCommands(): void
|
protected function registerCommands(): void
|
||||||
{
|
{
|
||||||
$catchConsole = new CatchConsole($this->app);
|
if ($this->app->runningInConsole()) {
|
||||||
|
$catchConsole = new CatchConsole($this->app);
|
||||||
|
|
||||||
$this->app->bind('catch_console', $catchConsole);
|
$this->app->bind('catch_console', $catchConsole);
|
||||||
|
|
||||||
$this->commands($catchConsole->commands());
|
$this->commands($catchConsole->commands());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user