File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -116,9 +116,13 @@ protected function resolveField(Request $request, Field $field): void
116116 );
117117
118118 if ($ field instanceof Relation) {
119- $ field ->resolveRouteKeyNameUsing (
120- fn (): string => Str::of ($ field ->getRelationName ())->singular ()->ucfirst ()->prepend ($ this ->getModelAttribute ())->value ()
121- );
119+ $ field ->resolveRouteKeyNameUsing (function () use ($ field ): string {
120+ return Str::of ($ field ->getRelationName ())
121+ ->singular ()
122+ ->ucfirst ()
123+ ->prepend ($ this ->getModelAttribute ())
124+ ->value ();
125+ });
122126 }
123127 }
124128
@@ -285,4 +289,12 @@ public function toValidate(Request $request, Model $model): array
285289 $ this ->resolveFields ($ request )->mapToValidate ($ request , $ model )
286290 );
287291 }
292+
293+ /**
294+ * Clone the field.
295+ */
296+ public function __clone (): void
297+ {
298+ $ this ->fields = null ;
299+ }
288300}
You can’t perform that action at this time.
0 commit comments