FilamentF
Filament3y ago
Noxo

update url

I need to update the URL when the form is changed.

I have a simple form on my page:
public function form(Form $form): Form
{
    return $form
        ->schema([
            Select::make('user')->options([1,2,3]),
        ])
        ->debounce()
        ->statePath('data');
}


It works great, but I need to update the URL GET parameters when the form is changed, similar to filters on the resource table.

I have no idea how to update the URL. I had investigated the table filters, but I didn't find what I need.
Solution
The solution was very simple, using queryString in livewire. Here's the link if anyone needs it - https://livewire.laravel.com/docs/url#using-the-querystring-method
Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Was this page helpful?