© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
DanielvdSpoel

relationship select morphMany

Is there any particular reason why this is not supported? It's only one model (in my case user) I have tried the following so far:
           Select::make('employees')
                    ->relationship('employees', 'name')
                    ->multiple()
                    ->searchable()
           Select::make('employees')
                    ->relationship('employees', 'name')
                    ->multiple()
                    ->searchable()


I got this error: https://flareapp.io/share/yPa2qjp7#F77

this is how i defined the relationship:
    public function employees(): MorphMany
    {
        return $this->morphMany(User::class, 'assignable');
    }
    public function employees(): MorphMany
    {
        return $this->morphMany(User::class, 'assignable');
    }
Flare
Filament\Forms\Components\Select::getRelationship(): Return value must be of type Illuminate\Database\Eloquent\Relations\BelongsTo|Illuminate\Database\Eloquent\Relations\BelongsToMany|Znck\Eloquent\Relations\BelongsToThrough|null, Illuminate\Database\Eloquent\Relations\MorphMany returned - The error occurred at http://127.0.0.1:8000/admin/projec...
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

TextInpiut with morphMany relationship
FilamentFFilament / ❓┊help
2y ago
Select relationship
FilamentFFilament / ❓┊help
3y ago
Repeater relationship select
FilamentFFilament / ❓┊help
13mo ago
MorphToMany Select Relationship
FilamentFFilament / ❓┊help
16mo ago