Skip to content

Commit

Permalink
refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
suraj-webkul committed Jun 13, 2024
1 parent 985f313 commit 4ea3965
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ public function update(array $data, $id, $attribute = "id")
*/
public function delete($id)
{
$organization = $this->model->findOrFail($id);
$organization = $this->findOrFail($id);

$organization->persons->each->delete();
$organization->persons()->delete();

$organization->delete($id);
}
Expand Down

0 comments on commit 4ea3965

Please sign in to comment.