I\'m using laravel 5.4. and I need handle some error. imagine user logged in and opened two windows (his profile). When user click on logout in a window, we have still logout bu
in App\Exceptions\Handler.php Return the user to the form with a new valid CSRF token, so the page will refreshed and logout button will not exist.
public function render($request, Exception $exception)
{
if($exception instanceof TokenMismatchException)
{
return redirect()
->back()
->with('your msg');
}
return parent::render($request, $exception);
}
this looking like, page was refreshed.
Don't Replace POST with Get. It will not Safe And Standard.