It looks like there is an issue with the CSRF field that Laravel uses to validate post requests. First, I would go to this file
vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php
and edit this function
protected function tokensMatch($request)
{
// Add this line
if (env('APP_ENV') === 'testing') {
return true;
}
// Leave the rest as it is
$token = $this->getTokenFromRequest($request);
return is_string($request->session()->token()) &&
is_string($token) &&
hash_equals($request->session()->token(), $token);
}
If that doesn't work, then you can disable the CSRF verification on a specific route by going here
App\Http\Middleware\VerifyCsrfToken.php
and including the route in this variable
protected $except = [
// include your route here
];
Ultimately running this command on the terminal can also help
php artisan config:clear