kirschbaum-development / nova-inline-relationship

A package to present relationships as inline properties in Nova.
MIT License
196 stars 84 forks source link

Workaround - Nova HasMany, HasManyThrough, MorphMany, etc #102

Open ahinkle opened 3 years ago

ahinkle commented 3 years ago

Hi all,

As posted in their README:

Please note that this is experimental and is not actively maintained and supported by our team. If you are interested in helping to maintain/extend this project please reach out.

Background: we initially started this project in 2019 to add inline relationship functionality to Laravel Nova. In addition to running into some significant complexities that prevented us from efficiently moving forward, Laravel Nova has since added functionality that covers most, but not all, of what we were trying to accomplish here. We recommend using those core Laravel Nova features instead of this package at this point.

This project doesn't seem to be maintained. We are looking to add a simple inline hasMany():

Product -> has many related products

We would prefer this inline. however, this package seems abandoned and unsupported on Laravel Nova v3.

According to the Nova docs, the only supported inline relationships are BelongsTo() and MorphTo(). Has anyone found a good alternative to accomplish this?

We have a workaround in place now which is a bit hacky. A multi-select with the ID Value pair -- of course, it saves as JSON and we have to sort out the mess via model observers. It's a bit of a nightmare - hoping for a solution without having to dump Laravel Nova, entirely.

0x15f commented 3 years ago

Looking for a solution to this as well for the exact same scenario.. the multi-level model saving seems to be a framework thing, I tried to implement it in https://github.com/yassilah/laravel-nova-nested-form.

baszach commented 2 years ago

Since Laravel Nova 4.0 inline creation for the HasOne field is supported. No external packages needed.

image