Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lostika's avatar

using morphOne relation does not show fields

How can I show fields from a polymorphic table? It is one-one polymorphic relation. Relation between Paper model and Price model. Price is a polymorphic model. Defining MorphOne::make('Price' ) does not work, fields from Price resource are not shown.

Another real-life example: Billing Profile, Shipping Profile - both can use Address. - Address is ideal in polymorphic relation type. So in these resources fields defined in Address resource should be injected. https://nova.laravel.com/docs/3.0/resources/relationships.html#morphone does not do anything

So how can I achieve, that when I creating Billing Profile than Address fields can be populated too?

0 likes
1 reply
lostika's avatar

Does anybody wanted to fill address with profile information together? How can we solve this?

Please or to participate in this conversation.