© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
7 replies
Positiverain

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)
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Count with Eloquent
FilamentFFilament / ❓┊help
3y ago
Form Builder support for polymorphic relationships
FilamentFFilament / ❓┊help
2y ago
Managing Relationships in the Form Builder
FilamentFFilament / ❓┊help
3y ago