Serban
Pass parameter from URL to table header action
I'm filtering the table results based on that param. I have this in my resource:
public static function getEloquentQuery(): Builder
{
return parent::getEloquentQuery()->when(request()->has('param'), function ($query) {
$query->where('id', request('param'));
});
}
3 replies