Redirect parameter loss

Hello, can anyone exprienced that when you make a redirect and pass a parameter to it, it will lose at some point. That point is when an afterStateUpdated() function is ran. I query the parameter using: request()->query('maintenance'). The parameter in the url is there but the request()->query('maintenance') returning null.
Solution
try to add a property in your page

#[Url]
public $maintenance = null;


...
->afterStateUpdated(function (Page $livewire) {
    //$livewire->maintenance
})


https://livewire.laravel.com/docs/url
Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Was this page helpful?