Polymorphic One to One (MorphOne) Relationship [Feature Request]
mrraindrop555 opened this issue · comments
Yeeden commented
Jérôme Tamarelle commented
This is already supported using morphOne()
.
Could you describe what you'd like to do, what you've tried and any errors you've encountered?
Yeeden commented
I tried importing the relationship but found VS code keep highlighting this problem.
Undefined type 'MongoDB\Laravel\Relations\MorphOne'
It works with other polymorphic relationships.
Jérôme Tamarelle commented
You can use Illuminate\Database\Eloquent\Relations\MorphOne
.