Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AbirkulovSherali's avatar

I faced the same problem a few times. First I deleted the project and pull it from reposetory. Then a little while later this problem appeared again. I tried deleting the vendor folder and run "composer install" and problem was gone )

1 like
Dunks1980's avatar

I got this error from a service worker caching everything.

vonhutvinh111's avatar

Hi Guy !! You should insert : input type="hidden" name="_token" value="{{ csrf_token() }}" in form . I think every problem will be solved !!! Good Luck for you ..hihi

1 like
ArK's avatar

I had the same problem using a VueJS Component where I needed to send data to Laravel using axios. Passing the _token through the form request solved my issue.

PaPZzz's avatar

it's a csrf field

use {{ csrf_field() }} instead

hope it works

it did for me

EugeneGpil's avatar

There is "mbstring.func_overload = 0" string in php.ini file. When I set it to 2, I had 419 error. Don't ask me why I did it. So I set it back to 0, and everything is ok. Maybe that will be helpefull for someone.

ifrond's avatar

another possible stupid misconfiguration is past time on your local machine (so browser takes all fresh cookies as outdated) fighted with this problem few hours before understand what the problem is

sanjay23's avatar

I am facing the same problem with Laravel 5.8 and PHP 7.1.32 I have checked session_domain, mbstring.func_overload, session_storage but still not able to solve this issue.

419 Page Expired

ahmedmuneer's avatar

I have the same issue when i do any post request , login registration , etc ..

kontramundo's avatar

Hi, I have the same problem. Did you solve it?

Laravel 6 PHP 7.2

hakhagmon's avatar

Laravel Framework 7.12.0 (php 7.4)

I also had such problems. I tried all the methods described here. But nothing helped.

  1. I deleted "vendor" folder
  2. run in console 'composer install'

fix it!

1 like
srenert's avatar

I'm on Laravel 7.x version and I am having a slightly different issue. My application works fine, but in Postman I am getting a 419 | expired error while making POST requests. GET requests work great after authentication.

I'm making the following requests (in sequence) /sanctum/csrf-cookie /login /user

Then following that, all GET requests work great. However, every POST request fails with a 419 error.

During /sanctum/csrf-cookie request, I'm setting the following in postman

pm.environment.set("xsrf-cookie", pm.cookies.get("XSRF-TOKEN"))

and then using that {{xsrf-cookie}} value with a X-XSRF-TOKEN authorization header.

I've googled everything I can think of, but can't get past this problem (in postman only).

aliabdm's avatar

after you make sure that you've added @csrf at your post form at your .env file add this line SESSION_DOMAIN = localhost run the PHP artisan serve open the project using localhost not using the IP address this will show the 419 error : http//:IP address:port/index this will work : http//:localhost:port/index

Previous

Please or to participate in this conversation.