Exemplo n.º 1
0
 /**
  *  Delete a project
  *
  * @return void
  *
  * @throws \Exception
  */
 public function delete()
 {
     $id = $this->id;
     parent::delete();
     /* Delete all children from the project */
     Project\Issue::where('project_id', '=', $id)->delete();
     Project\Issue\Comment::where('project_id', '=', $id)->delete();
     Project\User::where('project_id', '=', $id)->delete();
     User\Activity::where('parent_id', '=', $id)->delete();
 }
Exemplo n.º 2
0
 /**
  * Soft deletes a user and empties the email
  *
  * @return bool
  */
 public function delete()
 {
     $this->update(['email' => '', 'deleted' => User::DELETED_USERS]);
     Project\User::where('user_id', '=', $this->id)->delete();
     return true;
 }