Skip to content

Commit

Permalink
Update InteractsWithAPI.php
Browse files Browse the repository at this point in the history
Update error in delete functions not being passed the query
  • Loading branch information
colinhall17 authored Jun 2, 2021
1 parent eb1d6f0 commit 5af84e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Traits/InteractsWithAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,12 @@ public function delete()
if (! $this->hasKey()) {
return;
}
$this->beforeDeleting();
$this->beforeDeleting($query);

$response = $query->delete();

if($response){
$this->afterDeleting();
$this->afterDeleting($query);
}
return $response;
}
Expand Down

0 comments on commit 5af84e8

Please sign in to comment.