Example #1
0
 /**
  * Deletes a user
  * @param $id
  * @throws UserNotFoundException
  * @return mixed
  */
 public function delete($id)
 {
     if ($user = $this->user->find($id)) {
         return $user->delete();
     }
     throw new UserNotFoundException();
 }
Example #2
0
 public function delete()
 {
     if ($this->exists) {
         $this->user_activations()->delete();
         $this->tokens()->delete();
     }
     parent::delete();
 }
 /**
  * Returns all the users
  * @return object
  */
 public function all()
 {
     return $this->user->all();
 }