public function beforeDeleteTree(Event $event) { if ($this->children) { foreach ($this->children as $childNode) { $childNode->delete(); } } }