In my Controller, I have
Route::getCurrentRoute()->getAction()['as']
Everything works well in the browser but as soon as I type
php artisan route:list
in the terminal I have this exception
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to a member function getAction() on a non-object
If I comment this line everything works well.