I am running unit testing on a Laravel project through PhpStorm inbuilt test environment. I am getting token mismatch exception.
All the configurations are correct and it was working fine. Suddenly this error showed up. I tried with the terminal and it works fine. I am developing this projects under Vagrant.
What can I do to solve this issue?
I googled and found out that changing Laravel's VerifyCsrfToken as below will solve this issue. But I need this to be default as well.
$except = ['/*']
$except = ['/*']as it will disable it for all routes... or you could pass the csrf token with the call$this->call('POST', '/your-route', ['_token' => csrf_token(), ...]);