I’ve upload a Laravel 7 project on cpanel
. All post
methods give a 419 - page expired
error, but it works fine in localhost
.
I’ve set all @csrf
s exactly on the forms. I’ve set session domain in env
file. But it still doesn’t work.
Instead, it returns:
TokenMismatchException in VerifyCsrfToken.php line 53
3
Answers
I solved this problem with migrating website from http to https
Do you have CSRF in your header?
Add in your form on .blade.php file {{ csrf_field() }} or @csrf like this