Skip to content

Commit a5aac1e

Browse files
authored
Update Controller.php
1 parent 5b657de commit a5aac1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Controllers/Api/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public function handleDestroyAction($id, $request)
286286
$this->validateRequestType($request);
287287
try {
288288
$item = self::$model::findOrFail($id);
289-
$this->authoriseUserAction('delete', self::$model::find($id));
289+
$this->authoriseUserAction('delete', $item);
290290
$this->repository->deleteById($id);
291291
event(new Deleted($item, $request));
292292
} catch (ModelNotFoundException $exeption) {

0 commit comments

Comments
 (0)