示例#1
0
 public function actionIndex()
 {
     return $this->render('index', ['catData' => \galleryadmin\models\Cat::find()->all()]);
 }
示例#2
0
 public function actionIndex($catId)
 {
     return $this->render('index', ['catData' => Cat::findOne($catId), 'albenData' => Album::find()->where(['cat_id' => $catId])->all()]);
 }
示例#3
0
文件: Album.php 项目: bereznev/luya
 public function getCategoryName()
 {
     $category = Cat::findOne($this->cat_id);
     return $category->title;
 }