Skip to content

Commit

Permalink
Fix unique validation rule (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean authored Dec 16, 2023
1 parent cad168f commit 14d2f19
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Http/Controllers/ResourceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ public function update(UpdateRequest $request, $resourceHandle, $record)
->setParent($record)
->addValues($request->all())
->validator()
->withReplacements([
$resource->primaryKey() => $record,
])
->validate();

$record = $resource->model()
Expand Down

0 comments on commit 14d2f19

Please sign in to comment.