© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
6 replies
Abel Cobreros

EncryptCookies middleware 419 page expired error

I have a custom SimplePage with a form that is throwing a 419 error every time I try to submit it. I have tried also to create a filament-form component with the exact same result.

After some digging I've noticed the issue is related with the \Illuminate\Cookie\Middleware\EncryptCookies middleware and the problem goes away as soon as I remove the middleware from the panel or my custom route. Any ideas why?
Solution
Ok so looks like I've found the solution. I had to modify the AdminPanelProvider and change:

use Illuminate\Cookie\Middleware\EncryptCookies;

to:

use App\Http\Middleware\EncryptCookies;

Not sure why as the App one extends from the Illuminate class. Will leave it here in case it helps anyone.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

419 Page Expired Popup
FilamentFFilament / ❓┊help
2y ago
419 This Page has expired
FilamentFFilament / ❓┊help
16mo ago
Export 419 This Page has expired
FilamentFFilament / ❓┊help
14mo ago