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

pipariyah1's avatar

419 Page Expired

I facing 419 Page Expired problem. everything works like charm in local, but when I deploy it to server it gives 419 | Page Expired. Framework: 6.0, Php 7.2. In both local and server.

Pleae Help me out

0 likes
4 replies
mvd's avatar

hi @pipariyah1

You get a 419 status code, if an (external) script tries to post to your Laravel application, without the o-so-needed CSRF token.

First option is to change in App\Http\Middleware\VerifyCsrfToken: protected $except = [ /, ]; (or maybe something more specific and a little more safe, like /myapiurl/,)

Second option is to put the route in api.php instead of web.php, but that implies prefixing all your routes with /api/

https://markohoven.com/2018/01/23/419-http-status-code/

Already see/ tried this?

pipariyah1's avatar

But i need csrf verification for that and i also add @csrf in form. It is works me in local

Sinnbeck's avatar

Do you have a valid .env file with a APP_KEY ?

pipariyah1's avatar

Yes, I have Also I tried after regenarating APP_KEY but nothing works

Please or to participate in this conversation.