Search code examples
php-7laravel-7laravel-livewire

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


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


Solution

  • try to add this to VerifyCsrfToken Middleware:

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