© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
5 replies
DevRaeph

MorphMany Relation buggy in relationshipManager.

I have discovered a problem and am not sure whether I am doing something wrong or it's a bug. After hours of trying, I still can't find a solution.

The following initial situation.
I have a Vehicle Model with a MorphTo relation:

    public function Owner(): MorphTo
    {
        return $this->morphTo();
    }
    public function Owner(): MorphTo
    {
        return $this->morphTo();
    }


Then a Customer Model with a MorphMany relation:

    public function Vehicles(): MorphMany
    {
        return $this->morphMany(Vehicle::class, 'Owner');
    }
    public function Vehicles(): MorphMany
    {
        return $this->morphMany(Vehicle::class, 'Owner');
    }


And a Carrier Model with a MorphMany relation:

    public function Vehicles(): MorphMany
    {
        return $this->morphMany(Vehicle::class, 'owner');
    }
    public function Vehicles(): MorphMany
    {
        return $this->morphMany(Vehicle::class, 'owner');
    }


Both should be able to own several Vehicles.
Now, I inserted a RelationManager in my Customer Resource which should allow vehicles to be associated and removed on the Edit Page.

Assignment of the first vehicle still works quite normally. As soon as I want to assign another one, the Select Box is empty and no more vehicles are displayed for assignment.
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

MorphMany Relations not (yet) supported in V3 relationshipManager?
FilamentFFilament / ❓┊help
3y ago
relationship select morphMany
FilamentFFilament / ❓┊help
3y ago
MorphToSelect in Repeater (Mdue to MorphMany)
FilamentFFilament / ❓┊help
3y ago
RelationshipManager Table Ordering
FilamentFFilament / ❓┊help
2y ago