TokenMismatchException in VerifyCsrfToken.php Line 67
I'm assuming you added $this->middleware('auth');
inside the constructor of your controller to get the authentication working. In your login/register forms, if you are using {!! Form::someElement !!}
, add the following line at the top as well:
{!! csrf_field() !!}
Or if you are using input tags inside your forms, just add the following line after <form>
tag:<input type="hidden" name="_token" value="{{ csrf_token() }}">
Hope this helps. Laravel 5, Forms, TokenMismatchException in VerifyCsrfToken.php line 46
Internet explorer rejects sessions from domains with an underscore it. This is a known issue.
Please see here: Issue with Session and Cookie in Internet Explorer for websites containing underscore
And also:
http://blogs.msdn.com/b/ieinternals/archive/2009/08/20/wininet-ie-cookie-internals-faq.aspx
TokenMismatchException in VerifyCsrfToken.php line 46 ocassionally showing
We had the exact same problem and never found a good solution. We did find a workaround although.
In your .env file, set the Session storage to Redis (yap, you have to install Redis on your server than). This worked for us, never encountered the same problem again.
Note, this works for us, but it of course is not a solution, merely a work-around until someone found the right solution.
Related Topics
PHP Exec() Command: How to Specify Working Directory
How to Remove Text Between Tags in PHP
Get the Get Variables from a Url String
What Is the Best Method for Getting a Database Connection/Object into a Function in PHP
Php-Font-Lib Must Either Be Installed via Composer or Copied to Lib/Php-Font-Lib
Find Array Key in Objects Array Given an Attribute Value
Z-Scores(Standard Deviation and Mean) in PHP
Print Directly to Network Printer Using PHP
PHP - Ini_Set('Session.Gc_Maxlifetime', 5) - Why It Doesn't End the Session
PHP Looping Through Multiple Arrays
How to Sort Null Values Last Using Eloquent in Laravel
Using Moodle Create Users and Enroll Them in Courses via SQL
Laravel Unexpected Redirects ( 302 )
How to Return Only Named Groups with Preg_Match or Preg_Match_All