public function beforeDelete() { if (parent::beforeDelete()) { City::deleteAll('region_id = ' . $this->id); return true; } else { return false; } }