diff --git a/src/Console/MetaCommand.php b/src/Console/MetaCommand.php index e34270e0a..92f781d8a 100644 --- a/src/Console/MetaCommand.php +++ b/src/Console/MetaCommand.php @@ -233,7 +233,12 @@ protected function getExpectedArguments() ], [ 'class' => ['\Illuminate\Support\Facades\Route', '\Illuminate\Support\Facades\Auth', 'Illuminate\Foundation\Auth\Access\Authorizable'], - 'method' => ['can', 'cannot'], + 'method' => ['can', 'cannot', 'cant'], + 'argumentSet' => 'auth', + ], + [ + 'class' => ['Illuminate\Contracts\Auth\Access\Authorizable'], + 'method' => ['can'], 'argumentSet' => 'auth', ], [ @@ -308,7 +313,13 @@ protected function loadTemplate($name) { if (!isset($this->templateCache[$name])) { $file = __DIR__ . '/../../php-templates/' . basename($name) . '.php'; - $value = $this->files->requireOnce($file) ?: []; + try { + $value = $this->files->requireOnce($file) ?: []; + } catch (\Throwable $e) { + $value = []; + $this->warn('Cannot load template for ' . $name . ': ' . $e->getMessage()); + } + if (!$value instanceof Collection) { $value = collect($value); }