diff --git a/src/Http/Controllers/FieldController.php b/src/Http/Controllers/FieldController.php index 3cf0d7c..812ad1b 100644 --- a/src/Http/Controllers/FieldController.php +++ b/src/Http/Controllers/FieldController.php @@ -24,6 +24,10 @@ public function index(NovaRequest $request) } return $field; })->flatten(); + + $fields = $fields->filter(function ($value) use ($request) { + return ($value instanceof NovaBelongsToDepend); + }); $field = $fields->first(function ($value, $key) use ($request) { return ($value instanceof NovaBelongsToDepend && $value->attribute == $request->attribute);