php - laravel 5.5 The page has expired due to inactivity. Please refresh and try again -
i'm new laravel , have problem don't understand. have а log form in project , method post. when try request result is: 'the page has expired due inactivity. please refresh , try again.' ,but if change method get, works fine. can tell me why , how fix it, because of course need post method.
this problem comes csrf token verification fails. either you're not posting one, or you're posting incorrect one.
the reason works get route in laravel, there no csrf token posted.
you can either post csrf token in form calling:
{{ csrf_field() }} or exclude route in app/http/middleware/verifycsrftoken.php
protected $except = [ 'your/route' ];
Comments
Post a Comment