basic/_protected/controllers/BankController.php
/**
     * Creates a new Bank model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     * @return mixed
     */
Creates a new Bank model.
If creation is successful, the browser will be redirected to the 'view' page.
@return mixed
Creates a new Bank model . If creation is successful the browser will be redirected to the ' view ' page . @return mixed
public function actionCreate()
    {
        $model = new Bank();
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['index',]);
        }
        return $this->renderAjax('create', [
            'model' => $model,
        ]);
    }
public function actionCreate ( ) { $ model = new Bank ( ) ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) && $ model -> save ( ) ) { return $ this -> redirect ( [ 'index' , ] ) ; } return $ this -> renderAjax ( 'create' , [ 'model' => $ model , ] ) ; }
Creates a new Bank model.
Creates a new Bank model .
//            return $this->redirect(['view', 'id' => $model->id]);