on-internet
← Community

Laravel form returns "419 | Page Expired" on POST request, how do I fix it?

Stack Overflow ·

I have a simple form in Laravel that submits with POST, but after clicking submit I get "419 | Page Expired." It works on my local machine but fails on the live server. php <form method="POST" action="/contact"> <input type="text" name="name"> <button type="submit">Send</button> </form> php Route::post('/contact', [ContactController::class, 'store']); What causes this error and how do I fix it? Tags: php laravel csrf laravel-blade Answer: A 419 means Laravel rejected the request because the CSRF token was missing, invalid or expired. These are the common causes, in the order I'd check them. 1.

Comments

Sign in or sign up to comment and upvote.

No comments yet.