laravel-nova-nested-form
laravel-nova-nested-form copied to clipboard
Doesn't show Nested Form
Laravel 5.8 Nova 2.0.9
App/WebsiteTwilioNumber
public function website() { return $this->belongsTo('App\Website'); } }
App/Website
public function websiteTwilioNumbers() { return $this->hasMany('App\WebsiteTwilioNumber'); }
Nova/Website
public function fields(Request $request)
{
return [
...
HasMany::make('WebsiteTwilioNumbers'),
NestedForm::make('WebsiteTwilioNumbers'),
];
}
HasMany work good NestedForm doesn't work
https://github.com/yassipad/laravel-nova-nested-form/issues/64 https://github.com/laravel/nova-issues/issues/1735
+1
+1 the same here laravel : 5.8.* nova : 2.0.8
+1 Same here!
The problem of Visibility is solved with add:
'panel'=>$this->panel,
to jsonSerialize() function in Yassi\NestedForm\NestedForm class.
But now, for me return a error in SQL:
General error: 1364 Field 'user_id' doesn't have a default value (SQL: insert into
user_details
(name
,updated_at
,created_at
) values (Lorenzo, 2019-07-29 10:01:04, 2019-07-29 10:01:04))",
In my User Nova Resource FIELDS I have:
NestedForm::make("Details", 'details', UserDetail::class)->open(true),
so, this is just not going to be fixed?
@loreberti89 that fixes it actually
If you try to save the resource with the related model/resources, it works?
+1
@loreberti89 yup
@loreberti89 yup
For me, with HasOne relationships doesn't work.
@loreberti89 from what I can see on your log, user_id is missing, it might be related to something else, with a hasMany relation it actually works perfectly
thanks for your find tho
@g0shed hey man, i wonder if we upgraded to laravel nova 2 why in the composer is still ^1.something, am i mistaken on how this carret works? shouldn't we need to bump it
@loreberti89 I am trying to use this package with hasOne relationship and somehow when i edit the resource it tries to create new nested entity instead of updating the old one and it says 'duplicate id = .. ' is there any fix for that issue? are you experience the same thing?
@loreberti89 I am trying to use this package with hasOne relationship and somehow when i edit the resource it tries to create new nested entity instead of updating the old one and it says 'duplicate id = .. ' is there any fix for that issue? are you experience the same thing?
No, sorry. I've solved the problem related to show, but when I see that there are more and many bug and that it is no longer mantained, I leave this package.
@loreberti89 i think i solved the issue related to hasOne. but I am on Nova 2.0.5. and so far don't have any other issues. what are you gonna use instead?