/** * Lists all Uploadedforms models. * @return mixed */ public function actionIndex() { $username=Yii::$app->user->identity->username; $users = User::find()->all(); $scholars = Scholars::find()->all(); $model = new Uploadedforms(); foreach($users as $user){ foreach($scholars as $scholar){ if($user->username==$username&&$user->id==$scholar->scholar_id){ $model->uploaded_scholar_id=$scholar->scholar_id; $searchModel = new UploadedformsSearch($model); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); } } } }
{ return['class'=>'provincial-row']; } else if(strcasecmp($model->scholar_school_area, 'NCR') == 0) { return['class'=>'ncr-row']; } }, 'columns' => [ [ 'class' => 'kartik\grid\ExpandRowColumn', 'value' => function($model, $key, $index, $column){ return GridView::ROW_COLLAPSED; }, 'detail' => function ($model, $key, $index, $column){ $searchModel = new UploadedformsSearch(); $searchModel -> uploaded_scholar_id = $model->scholar_id; $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return Yii::$app->controller->renderPartial('_uploadedformsrecords',[ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }, ], 'scholar_id', 'scholar_firstName', 'scholar_lastName', 'scholar_middleName', // 'scholar_gender',
/** * Lists all Uploadedforms models. * @return mixed */ public function actionIndex() { $searchModel = new UploadedformsSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }