Laravel 5 : [Call to a member function getAction() on a non-object -
in controller, have
route::getcurrentroute()->getaction()['as']
everything works in browser type
php artisan route:list
in terminal have exception
[symfony\component\debug\exception\fatalerrorexception] call member function getaction() on non-object
if comment line works well.
seems obvious doesn't it?
get current route in browser return visited route. in terminal not have such request. laravel return null when asking route visited. have check return value before calling getaction.
Comments
Post a Comment