Skip to content

Commit

Permalink
fetch resource by attribute instead of name
Browse files Browse the repository at this point in the history
  • Loading branch information
milewski committed Oct 25, 2019
1 parent c27d850 commit a08ba55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Controllers/FilepondController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function process(NovaRequest $request)
$resource = (new $resourceClass($resourceClass::newModel()));
$rules = $resource->creationFields($request)
->whereInstanceOf(Filepond::class)
->firstWhere('name', $attribute)
->firstWhere('attribute', $attribute)
->getCreationRules($request);

$this->validate($request, Arr::only($rules, $attribute));
Expand Down

0 comments on commit a08ba55

Please sign in to comment.