/**
  * Lists all Departments models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new DepartmentsSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     $dataProvider->pagination->pageSize = 10;
     $pagename = "department";
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'pagename' => $pagename]);
 }
 /**
  * Lists all Departments models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new DepartmentsSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }