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

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -