public function actionUpdateData($id)
    {
        if ($post = Yii::$app->request->post()) {
            $model = $this->findModel($id);
            $model->$post['name'] = $post['value'];
            if ($model->save(false)) {
                echo 'true';
                exit;
            }
        }
        echo 'false';
    }
public function actionUpdateData($id)
    {
        if ($post = Yii::$app->request->post()) {
            $model = $this->findModel($id);
            $model->$post['name'] = $post['value'];
            if ($model->save(false)) {
                echo 'true';
                exit;
            }
        }
        echo 'false';
    }
public function actionUpdateData ( $ id ) { if ( $ post = Yii :: $ app -> request -> post ( ) ) { $ model = $ this -> findModel ( $ id ) ; $ model -> $ post [ 'name' ] = $ post [ 'value' ] ; if ( $ model -> save ( false ) ) { echo 'true' ; exit ; } } echo 'false' ; }
Update data information of media
@param $id
@throws NotFoundHttpException
Update data information of media