/** * This is invoked after the record is deleted. */ public function afterDelete() { parent::afterDelete(); Question::decrementAnswers($this->question_id); Vote::removeRelation($this); }
/** * This is invoked after the record is deleted. */ public function afterDelete() { parent::afterDelete(); Tag::updateFrequency($this->tags, ''); Vote::removeRelation($this); Answer::removeRelation($this->id); }