nova-inline-relationship icon indicating copy to clipboard operation
nova-inline-relationship copied to clipboard

requireChild() not Working

Open henryavila opened this issue 5 years ago • 2 comments

Hi, The requireChild() is not working for me. I don't Know if I missed anything.

In my case, I have a Client With a Many to Many relationship with Website. Then when

When I use:

HasMany::make(__('Websites'), 'websites', NovaWebsite::class)->inline()->requireChild()

I get the error:

Method KirschbaumDevelopment\NovaInlineRelationship\NovaInlineRelationship::requireChild does not exist

henryavila avatar Dec 24 '19 11:12 henryavila

@henryavila would you please open your composer.lock file, do a quick search for nova-inline-relationship and check which version is currently installed? It should be version 0.2.0. Hopefully this helps, but if not, please let me know and I will help get to the bottom of this!

brandonferens avatar Dec 24 '19 14:12 brandonferens

Hi

Thanks for the great package.

When I use requireChild, I don't get any error, however there is no validation to make sure that there is at least one child. I also tried applying the required rule to the field, but it did not work either.

Also, when using requiredChild, when I remove the child, "something" still tries to save the model.

Please advise. Thanks Ashley

AshleyMinshall avatar Jan 30 '20 08:01 AshleyMinshall