public function getCategoryName() { $category = Cat::findOne($this->cat_id); return $category->title; }