I started having this problem since I uploaded my project to a remote server. The exception that its throwing is the following:
TokenMismatchException in VerifyCsrfToken.php line 46:
So I went to that line and noticed that in the function tokenMatch, the condition below fails:
Ok first of all, thank you very much for your help! I really appreciate it.
I am following your last steps like this:
Checked my files path: 'files' => storage_path().'/framework/sessions',
chmod 777 storage
Cleared cache via artisan cache:clear
Cleared cache from my browser
Refreshed my view, and I still get the problem. Is there any segment of the code you'd like me to paste here? I am almost 4 hours trying to fix this issue.
:( It was like that before, I changed to Blade form hoping it will fix it but didnt fix.
Since I copied it from my local machine to the webserver (cpanel), is there a chance it is trying to find a path from my pc?
I did a deep search for the paths and Laravel doesnt use static routes so I discarded that posibility
as per documentation,
In addition to checking for the CSRF token as a POST parameter, the Laravel VerifyCsrfToken middleware will also check for the X-CSRF-TOKEN request header. You could, for example, store the token in a "meta" tag:
No luck my friend. This is weird,and what if I install a new laravel 5.0 from scratch? and copy paste the folders of my views, controllers, requests, mid... etc.
OK, I submited a ticket to my webserver support so I hope that fixes it. meanwhile I did what I told you about instaling laravel 5.0 from scratch and after that copied all my files, but didnt work ...
My friend I fixed it, the problem was that I made my own AuthController the same way that I used to do it on versions 4.x. So I had a wrong constructor build and I wasnt using the trait AuthenticatesAndRegistersUsers.
It is still weird that my wrong implementation worked perfectly on my local env.
Now I am finally logging in succesfuly!!
I am facing one new minor issue now, but Im probably gonna give it some time to try to fix it myself but I have a terrible headache. It is about @include('dashboard_main_content'), it says that _main_content does not exist.