TokenMismatchException in VerifyCsrfToken.php line 67:
Hi everyone,
The error happens when trying to update records with a form. I followed the Laravel from Scratch series, don't think there are errors on my code.
As per other posts, it seems there are important changes between Laravel 5.2 (which I am using) and 5.0 (the one used at the time the series was recorded).
Is downgrading to 5.0 version a good solution to this problem? if not, please help on how to adapt the project to Laravel 5.2.
Thanks!
Token is just the token. csrf_field() is a full hidden form element named token. You don't need it in the meta element unless you plan to use ajax and want to grab it client side from the meta field.
the link was found on search, and explains why there were changes on the way Laravel works.
Not tried myself yet but I hope the information will be of use for others.
confirming here: Adding the routes to a "web" middleware AND adding the {{ csrf_field() }} in to the form will work. No more "TokenMismatchException in VerifyCsrfToken.php line 67:"
@Snapey, @toniperic - Thanks!