F
Filamentβ€’5mo ago
wazkaz

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 ```php #[Url] public $maintenance = null;...
Laravel
URL Query Parameters | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Jump to solution
2 Replies
Solution
LeandroFerreira
LeandroFerreiraβ€’5mo ago
try to add a property in your page
#[Url]
public $maintenance = null;
#[Url]
public $maintenance = null;
...
->afterStateUpdated(function (Page $livewire) {
//$livewire->maintenance
})
...
->afterStateUpdated(function (Page $livewire) {
//$livewire->maintenance
})
https://livewire.laravel.com/docs/url
Laravel
URL Query Parameters | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
wazkaz
wazkazOPβ€’5mo ago
Thanks, it worked! πŸ˜„
Want results from more Discord servers?
Add your server