Open menphurk236 opened 1 year ago
Hey @menphurk236
I have no idea what could be wrong because i don't use artisan serve
.
I recommend to run this project with Laravel Homestead or Laravel Valet.
Best Regards, Darko
Hello @menphurk236,
I've added the following environment variables with these values:
APP_URL=http://localhost:8000/ SANCTUM_STATEFUL_DOMAINS=localhost:8000 SESSION_DOMAIN=localhost SPA_URL="${APP_URL}" This adjustment resolved the issue.
Best Regards, Krishna
I have fixed this issue by change the browser url to http://localhost:8000
By default, if you press ctrl + click
on the url on your terminal, then browser will open http://127.0.0.1:8000
This will cause the problem.
I had the same problem, my solution was to add the crsf token to "resources/app/plugins/axios.js"
axios.defaults.headers.common['X-CSRF-TOKEN'] = window.AppConfig.csrf;
The token is correctly set in "resources/views/index.blade.php" but not used. After adding this line, the error disappears.
run command : php artisan serve
my .env config APP_URL=http://127.0.0.1:8000 SANCTUM_STATEFUL_DOMAINS=127.0.0.1:8000 SESSION_DOMAIN=localhost