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,
        ]);
    }