FIX: do not prevent running ModuleManager in CLI mode

This commit is contained in:
Michal Kváček
2016-09-20 23:37:32 +02:00
parent 01a28fc65a
commit 5ddb31b57b
+5 -5
View File
@@ -15,14 +15,14 @@ class ModuleManager extends ServiceProvider
*/
public function boot()
{
// ignore running from artisan
if (App::runningInConsole()) {
return;
}
// this service provider needs published config - config is merged right after this service provider
try {
$modules = Module::where('is_template', false)
->get();
} catch (\Exception $e) {
// ignore error
return;
}
// iterate over all modules and enable or disable them
foreach ($modules as $module) {