/** * @return bool */ public function hasParent() { return $this->getAttribute('parent_id') && parent::whereId($this->getAttribute('parent_id'))->count(); }
/** * @return bool */ public function hasParent() { return $this->getAttribute('parent_id') && parent::whereId($this->getAttribute('parent_id'))->count(); }