public function actionIndex() { return $this->render('index', ['catData' => \galleryadmin\models\Cat::find()->all()]); }
public function actionIndex($catId) { return $this->render('index', ['catData' => Cat::findOne($catId), 'albenData' => Album::find()->where(['cat_id' => $catId])->all()]); }
public function getCategoryName() { $category = Cat::findOne($this->cat_id); return $category->title; }