I am working on laravel 5.7.28 version on window machine. Before 2 days it was working fine. But suddenly it is not working right now. It is working fine on live server. I have tried everything like clear cache, composer update etc.
Every form i am sending csrf token with form. Also my other project on same server is working fine.
419 Page Expired (Laravel Framework) Used by the Laravel Framework when a CSRF Token is missing or expired.
This means that your token generation is invalid or it takes too much time to be sent
Every form i am sending csrf token with form
There are different ways to put CSRF tokens in Laravel so did you tried them all?
https://laravel.com/docs/5.8/csrf
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'stripe/*',
'http://example.com/foo/bar',
'http://example.com/foo/*',
];
}
Go there and exclude your route. Try a POST request to the Model and if it works the CSRF is the problem :)