优化模块下 commands 在cli模式下注入
This commit is contained in:
parent
929f9b2a75
commit
6e1fdb2b74
@ -52,7 +52,7 @@ abstract class ModuleService extends Service
|
||||
*/
|
||||
protected function registerCommands()
|
||||
{
|
||||
if (method_exists($this,'loadCommands')) {
|
||||
if (method_exists($this,'loadCommands') && $this->app->runningInConsole()) {
|
||||
list($namespace, $path) = $this->loadCommands();
|
||||
|
||||
$catchConsole = $this->app['catch_console'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user