public function beforeDelete() { if (parent::beforeDelete()) { $this->portfolioWorks = array(); $this->gallery = array(); $this->workType = array(); return true; } return false; }
public function beforeDelete() { if (parent::beforeDelete()) { $file ='./'.$this->imgPath.$this->image_name; if (is_file($file)) @unlink($file); return true; } return false; }