public function categoryId() { if ($this->forum_parents) { return array_keys($this->forum_parents)[0]; } else { return $this->forum_id; } }