public function getStatus() { $datos = Status::find()->asArray()->all(); return ArrayHelper::map($datos, 'id', 'nombre'); }
public function actionIndex() { return new ActiveDataProvider(['query' => Status::find()->where(['is_active' => 1]), 'pagination' => ['pageSize' => 10], 'sort' => ['defaultOrder' => ['id' => SORT_DESC]]]); }