Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ahinkle opened this issue Aug 19, 2021 · 2 comments
Open

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

ahinkle opened this issue Aug 19, 2021 · 2 comments

Comments

@ahinkle
Copy link

ahinkle commented Aug 19, 2021

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
Copy link

0x15f commented Aug 23, 2021

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
Copy link

baszach commented Jul 4, 2022

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

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants