Filter not working when modify getEloquentQuery with where o whereBelongsTo

If I modify the filters stop working
2 Replies
cheesegrits
cheesegrits14mo ago
Can you provide the relavent code.
H.Bilbao
H.BilbaoOP14mo ago
public static function getEloquentQuery(): Builder
{
return parent::getEloquentQuery()
->whereBelongsTo(auth()->user(), 'ownedBy')
->orWhereBelongsTo(auth()->user(), 'requestedBy')
->withoutGlobalScopes([
SoftDeletingScope::class,
]);
}
public static function getEloquentQuery(): Builder
{
return parent::getEloquentQuery()
->whereBelongsTo(auth()->user(), 'ownedBy')
->orWhereBelongsTo(auth()->user(), 'requestedBy')
->withoutGlobalScopes([
SoftDeletingScope::class,
]);
}
->filters([
Tables\Filters\SelectFilter::make('status_id')
->relationship('status', 'name')
->default([1, 2, 3, 4, 5, 8])
->multiple()
->preload()
->label(trans('ticket.resource.status')),
])
->filters([
Tables\Filters\SelectFilter::make('status_id')
->relationship('status', 'name')
->default([1, 2, 3, 4, 5, 8])
->multiple()
->preload()
->label(trans('ticket.resource.status')),
])
Want results from more Discord servers?
Add your server