Reputation: 438
I am facing token mismatch issue in new server while working fine in localhost. I have tried every possible way to clear cache and give SESSION_DOMAIN path in env but all seems useless.
Also session cookies are not being created in web browser while creating in storage/framework/session folder.
Please help me !
Upvotes: 6
Views: 1821
Reputation: 2919
Another thing to try is checking for web
middleware presence. Normally it should be automatically applied to routes/web.php
Route::group(['middleware' => ['web']], function () {
<routes>
});
Also check out https://laravel.com/docs/5.3/upgrade to see if you have any code that might have been influenced by this update.
And lastly, it would be nice if you could post a piece of code which is responsible for sessions in your app.
Upvotes: 0
Reputation: 1212
Are you getting tokenMismatchException
exception?
If yes, some of the possible reasons are:
Check your files for PHP end tag "?>", if exists remove it. For more detail refer to this link.
You may need to use web
middleware. For more detail refer to this link (although it is about laravel 5.2 but, it may work for your situation too).
Upvotes: 1