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.