Eloquent Builder with relationships

I could use $user->hasRole('admin') to identify admins. But filament uses query builder for generating tables: parent::getEloquentQuery().
How do I make it so that parent::getEloquentQuery would generate table with only admin records? ->with('roles') isn't working.
(I am using spatie permissions)
Was this page helpful?