Show filtering and sorting in url
abstract class MyBaseGrid extends BaseLaraGrid
{
#[Url] // we added this line
public array $filter = [];
#[Url(except: 'id')] // we added this line
public string $sortColumn = 'id';
#[Url] // we added this line
public string $sortDirection = 'desc';
protected function getFilterResetButton(): FilterResetButton
{
return FilterResetButton::make();
}
protected function getTheme(): BaseLaraGridTheme
{
return MyTheme::make();
}
}Last updated