コード例 #1
0
 public function actionIndex()
 {
     $educationsTop = new EducationalInstitutionTop();
     $searchModel = new EducationalInstitutionSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'educationsTop' => $educationsTop->getTop()]);
 }
コード例 #2
0
 public function getTop()
 {
     $query = EducationalInstitutionTop::find();
     return $dataProvider = new ActiveDataProvider(['query' => $query]);
 }