/**
  * Lists all Uploadedforms models.
  * @return mixed
  */
 public function actionIndex()
 {
     $username = Yii::$app->user->identity->username;
     $users = User::find()->all();
     $scholars = Scholar::find()->all();
     $model = new Upload();
     foreach ($users as $user) {
         foreach ($scholars as $scholar) {
             if ($user->username == $username && $user->id == $scholar->scholar_id) {
                 $model->scholar_scholar_id = $scholar->scholar_id;
                 $searchModel = new UploadSearch($model);
                 $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
                 return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
             }
         }
     }
 }
 /**
  * Lists all Upload models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new UploadSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }