© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
jals65

Relationships in filters.

Hi, I have 2 models related: Projects and Repository.

The project has one repository.

In the project model, the reporitory is telated using this a repository function with hasOne.

In the table of projects, the repository version is printed correctly, but now I'm trying to add a filter about that version. I need a select filter of the available versions to filter projects by repository version.

But i'm getting this error:
Filament\Forms\Components\Select::getRelationship(): Return value must be of type Illuminate\Database\Eloquent\Relations\BelongsTo|Illuminate\Database\Eloquent\Relations\BelongsToMany|Illuminate\Database\Eloquent\Relations\HasOneThrough|Znck\Eloquent\Relations\BelongsToThrough|null, Illuminate\Database\Eloquent\Relations\HasOne returned
Filament\Forms\Components\Select::getRelationship(): Return value must be of type Illuminate\Database\Eloquent\Relations\BelongsTo|Illuminate\Database\Eloquent\Relations\BelongsToMany|Illuminate\Database\Eloquent\Relations\HasOneThrough|Znck\Eloquent\Relations\BelongsToThrough|null, Illuminate\Database\Eloquent\Relations\HasOne returned
Captura_de_Pantalla_2023-11-30_a_las_17.15.13.png
Captura_de_Pantalla_2023-11-30_a_las_17.14.47.png
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

relationships counting-relationships with date filters
FilamentFFilament / ❓┊help
2y ago
How to get selected filters in filtersApplyAction?
FilamentFFilament / ❓┊help
2y ago
Relationships in sorting
FilamentFFilament / ❓┊help
3y ago