public function getFirstChildAttribute() : Article { if (!$this->hasChildren()) { throw new Exception("Article `{$this->id}` doesn't have any children."); } return $this->children->sortBy('order_column')->first(); }