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?
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.
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.
