Why i get alert : "This page has expired" in laravel livewire upon logging back in in?

730 Views Asked by At

I created a step-by-step form using Laravel Livewire, following this tutorial: here.

However, I'm experiencing some issues when logging in after logging out, when I submit the form I get a alert:

"This page has expired".

Interestingly, when I run php artisan optimize:clear, the alert disappears. Does anyone know the reason behind this behavior?

Alert image

1

There are 1 best solutions below

0
salma nidar On BEST ANSWER

try to add this to VerifyCsrfToken Middleware:

 protected $except = [
         'livewire/*',
     ];