controllers/CurrencyExchangeOrderController.php
/**
     * Creates a new CurrencyExchangeOrder model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     * @return mixed
     */
Creates a new CurrencyExchangeOrder model.
If creation is successful, the browser will be redirected to the 'view' page.
@return mixed
Creates a new CurrencyExchangeOrder model . If creation is successful the browser will be redirected to the ' view ' page . @return mixed
public function actionCreate()
    {
        $model = new CurrencyExchangeOrder();
        $model->user_id = Yii::$app->user->identity->id;
        if ($model->load(($post = Yii::$app->request->post())) && $model->save()) {
            return $this->redirect(['view', 'id' => $model->id]);
        }
        return $this->render('create', [
            'model' => $model,
            'currencies' => Currency::find()->all(),
        ]);
    }
public function actionCreate ( ) { $ model = new CurrencyExchangeOrder ( ) ; $ model -> user_id = Yii :: $ app -> user -> identity -> id ; if ( $ model -> load ( ( $ post = Yii :: $ app -> request -> post ( ) ) ) && $ model -> save ( ) ) { return $ this -> redirect ( [ 'view' , 'id' => $ model -> id ] ) ; } return $ this -> render ( 'create' , [ 'model' => $ model , 'currencies' => Currency :: find ( ) -> all ( ) , ] ) ; }
Creates a new CurrencyExchangeOrder model.
Creates a new CurrencyExchangeOrder model .