I am using Laravel 5.3 and the laravelcollective/html form helpers.
When I submit a form, if the validation fails it takes you back to the same form using return redirect()->back()->with
Then if I resubmit the same form again I will get a TokenMismatchException, what happenned is that the csrf token did not refreshed after the form was reloaded.
Any ideas of how can I get the token refreshed?
Update 11/07
To open the form I use the following:
{!! Form::open(['url'=>'/user/create', 'method'=>'post', 'id'=>'create']) !!}
Which automatically adds the token field.
But Also I have tried adding the token manually, like this:
{!! Form::open(['url'=>'/user/create', 'method'=>'post', 'id'=>'create']) !!}
{!! Form::token() !!}
Here the token is actually created twice, both tokens are be the same.