/**
  * Lists all Departamentos models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new DepartamentosSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
Example #2
0
 public static function getListDepartamento()
 {
     $opciones = DepartamentosSearch::find()->asArray()->all();
     return ArrayHelper::map($opciones, 'id', 'descripcion');
 }