Skip to content

Commit

Permalink
Delete eloquent user through the repository. Closes #2697
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Oct 20, 2020
1 parent 7bd4f77 commit da93359
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions src/Auth/Eloquent/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,6 @@ public function saveToDatabase()
$this->saveGroups();
}

public function delete()
{
$this->model()->delete();

event(new UserDeleted($this->id(), []));
}

public function lastModified()
{
return $this->model()->updated_at;
Expand Down
2 changes: 1 addition & 1 deletion src/Auth/Eloquent/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function save(UserContract $user)

public function delete(UserContract $user)
{
// todo
$user->model()->delete();
}

public function fromUser($user): ?UserContract
Expand Down

0 comments on commit da93359

Please sign in to comment.