/** * Lists all Section models. * @return mixed */ public function actionIndex() { $model = Section::find()->orderBy(['section_name' => SORT_ASC])->all(); $grade_level = GradeLevel::find()->all(); $listData = ArrayHelper::map($grade_level, 'id', 'name'); $searchModel = new SectionSearch(); $dataProvider = $searchModel->searchSection(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'listData' => $listData, 'model' => $model]); }
/** * Lists all Section models. * @return mixed */ public function actionIndex() { $searchModel = new SectionSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }