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
Captura_de_Pantalla_2023-11-30_a_las_17.15.13.png
Captura_de_Pantalla_2023-11-30_a_las_17.14.47.png
Was this page helpful?