Wednesday, March 8, 2017

Laravel ErrorException in VerifyCsrfToken.php, trying to get property of a non-object

I'm having a strange issue and I'm not sure what's wrong. When I log into my account in my L5 application, and if I try to visit for example www.mysite.com/login, I receive an error message. All of the authentication based urls throw the following error if you are logged in.

ErrorException in VerifyCsrfToken.php line 156: Trying to get property of non-object

My goal is to redirect the user to their user dashboard if they try to visit one of the authentication links if they're logged in. My VerifyCSRFToken file is the default one, I haven't changed anything. What am I missing here?

I haven't changed anything regarding VerifyCSRFToken in app/http/middleware



via Petar-Krešimir

Advertisement