-
Notifications
You must be signed in to change notification settings - Fork 88
Description
When using this with a one-to-one relationship, Nova throws an error "Undefined index: value".
Full error:
Undefined index: values {"userId":2,"exception":"[object] (ErrorException(code: 0): Undefined index: values at /var/www/vendor/kirschbaum-development/nova-inline-relationship/src/NovaInlineRelationship.php:520)
public function fields(Request $request)
{
return [
ID::make(__('ID'), 'id')->sortable(),
HasOne::make('Delivery Options', 'deliveryOption', ShippingZoneDeliveryOption::class)->inline(),
If I take out "inline" the relationship works. I can create, update and do all the regular things. As a matter of fact, if I create the relationship traditionally and then enable inline on it, I can update it normally.
The issue seems to be with creating it. I'm using the latest Nova/Laravel version.
-- Edit --
When I trace the code NovaInlineRelationship.php:520, it seems like $itemData only has a 'modelId' property, but no values, so an error is being thrown.
▾ $itemData = (array [1])
| ⬦ $itemData["modelId"] = (string [1]) `0`