code: public function actionList()
      {
          Yii::$app->response->format = Response::FORMAT_JSON;
          $searchModel = new SearchCountry();
          $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
          $dataProvider->setPagination(false);
          $dataProvider->getSort()->defaultOrder = ['name' => SORT_ASC];
          return ArrayHelper::map($dataProvider->getModels(), 'id', 'name');
      }
docs: Gets a json list of the countries in the database.
  
  @return array