original_string: public function actionIndex()
      {
          $model = new Location();
          if ($model->load(\Yii::$app->request->post()) && $model->save()) {
              $model = new Location(); //reset model
          }
  
          $searchModel = new LocationSearch(['pagination' => TRUE]);
          $dataProvider = $searchModel->search(\Yii::$app->request->queryParams);
  
          return $this->render('index', [
                      'searchModel' => $searchModel,
                      'dataProvider' => $dataProvider,
                      'model' => $model,
          ]);
      }
code: public function actionIndex()
      {
          $model = new Location();
          if ($model->load(\Yii::$app->request->post()) && $model->save()) {
              $model = new Location(); //reset model
          }
  
          $searchModel = new LocationSearch(['pagination' => TRUE]);
          $dataProvider = $searchModel->search(\Yii::$app->request->queryParams);
  
          return $this->render('index', [
                      'searchModel' => $searchModel,
                      'dataProvider' => $dataProvider,
                      'model' => $model,
          ]);
      }
code_tokens: public function actionIndex ( ) { $ model = new Location ( ) ; if ( $ model -> load ( \ Yii :: $ app -> request -> post ( ) ) && $ model -> save ( ) ) { $ model = new Location ( ) ; //reset model } $ searchModel = new LocationSearch ( [ 'pagination' => TRUE ] ) ; $ dataProvider = $ searchModel -> search ( \ Yii :: $ app -> request -> queryParams ) ; return $ this -> render ( 'index' , [ 'searchModel' => $ searchModel , 'dataProvider' => $ dataProvider , 'model' => $ model , ] ) ; }
docstring: Lists all Location models.
  @return mixed
docstring_tokens: Lists all Location models .