basic/_protected/controllers/FileInfoController.php
/**
     * Updates an existing FileInfo model.
     * If update is successful, the browser will be redirected to the 'view' page.
     * @param integer $id
     * @return mixed
     * @throws NotFoundHttpException if the model cannot be found
     */
Updates an existing FileInfo model.
If update is successful, the browser will be redirected to the 'view' page.
@param integer $id
@return mixed
@throws NotFoundHttpException if the model cannot be found
Updates an existing FileInfo model . If update is successful the browser will be redirected to the ' view ' page . @param integer $id @return mixed @throws NotFoundHttpException if the model cannot be found
public function actionUpdate($id)
    {
        $model = $this->findModel($id);
        $fayl = FileInfo::find()->where(['id' => $id])->one();
        if ($model->load(Yii::$app->request->post())) {
            $fayl->bank_mfo = $model->bank_mfo;
            $fayl->company_account = $model->company_account;
            $fayl->company_inn = $model->company_inn;
            $fayl->file_name = $model->file_name;
            $fayl->file_date = $model->file_date;
            $fayl->data_period = $model->data_period;
            $fayl->save(false);
            return $this->redirect(['view', 'id' => $model->id]);
        }
        return $this->renderAjax('update', [
            'model' => $model,
        ]);
    }
public function actionUpdate ( $ id ) { $ model = $ this -> findModel ( $ id ) ; $ fayl = FileInfo :: find ( ) -> where ( [ 'id' => $ id ] ) -> one ( ) ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) ) { $ fayl -> bank_mfo = $ model -> bank_mfo ; $ fayl -> company_account = $ model -> company_account ; $ fayl -> company_inn = $ model -> company_inn ; $ fayl -> file_name = $ model -> file_name ; $ fayl -> file_date = $ model -> file_date ; $ fayl -> data_period = $ model -> data_period ; $ fayl -> save ( false ) ; return $ this -> redirect ( [ 'view' , 'id' => $ model -> id ] ) ; } return $ this -> renderAjax ( 'update' , [ 'model' => $ model , ] ) ; }
Updates an existing FileInfo model.
Updates an existing FileInfo model .
//            'fayl' => $fayl,