© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
6 replies
namrata

Select filter throwing error when using relationship

\Filament\Tables\Filters\SelectFilter::make('user_id')
                    ->relationship('user', 'name')
\Filament\Tables\Filters\SelectFilter::make('user_id')
                    ->relationship('user', 'name')

This is my code and this gives error https://flareapp.io/share/w5BnMJv5#context-app-views . This is working in all my other resources except for this one. If I use any other filed like id or phone or anything else it takes a lot to load and crashes my whole application. But if I do

->relationship(
    name: 'user',
    titleAttribute: 'name',
    modifyQueryUsing: fn(Builder $query) => $query->has('productSlug'),
)
->relationship(
    name: 'user',
    titleAttribute: 'name',
    modifyQueryUsing: fn(Builder $query) => $query->has('productSlug'),
)
this works. Am I suppose to do it like this ? Also, when I use relationship in other resources as well, it gives all data not the relationships one.
Flare
Filament\Forms\Components\Select::isOptionDisabled(): Argument #2 ($label) must be of type string, null given, called in /Users/namrata/ug/backend/storage/framework/views/ccaf1eba786fda1c93f5e422c4e8cc96.php on line 86 - The error occurred at http://backend.test/admin/product-slugs
Solution
Ok thank you
Jump to solution
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

Pivot Select using Relationship
FilamentFFilament / ❓┊help
2w ago
Error getEditOptionActionFormData when using editOptionForm in Select without a relationship
FilamentFFilament / ❓┊help
3y ago
Problem - unknown column when using relationship in select
FilamentFFilament / ❓┊help
9mo ago
Using formatStateUsing on Select relationship
FilamentFFilament / ❓┊help
2y ago