/** * @return bool */ public function delete() { Hit::where(['game_user_id' => $this->id])->deleteAll(); return parent::delete(); }
/** * @return bool */ public function delete() { $this->current_game_user_id = null; $this->winner_game_user_id = null; $this->update(); GameUser::where(['game_id' => $this->id])->deleteEach(); return parent::delete(); }