/** * 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]); }
public static function getListDepartamento() { $opciones = DepartamentosSearch::find()->asArray()->all(); return ArrayHelper::map($opciones, 'id', 'descripcion'); }