how can i show table values by condition?

i want to display only record which belong to the current user, so i did the code in image. but i get this error:
An attempt was made to evaluate a closure for [Filament\Tables\Table], but [$query] was unresolvable.
so what should i do?
No description
1 Reply
LeandroFerreira
LeandroFerreira9mo ago
use Illuminate\Database\Eloquent\Builder;
...

$table
->modifyQueryUsing(fn (Builder $query) => $query->where('seller_id', auth()->id()))
use Illuminate\Database\Eloquent\Builder;
...

$table
->modifyQueryUsing(fn (Builder $query) => $query->where('seller_id', auth()->id()))
Want results from more Discord servers?
Add your server