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