modules/api/v1/controllers/BlockUserController.php
/**
     * Creates a new BlockUser model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     * @return mixed
     */
Creates a new BlockUser model.
If creation is successful, the browser will be redirected to the 'view' page.
@return mixed
Creates a new BlockUser model . If creation is successful the browser will be redirected to the ' view ' page . @return mixed
public function actionCreate()
    {
        $post = Yii::$app->request->post();
        $postData['BlockUser'] = $post;
        $postData['BlockUser']['user_id'] = Yii::$app->user->identity->id;
        $model = new BlockUser();
        if ($model->load($postData) && $model->validate()) {
            $model->save();
        }
        return $model;
    }
public function actionCreate ( ) { $ post = Yii :: $ app -> request -> post ( ) ; $ postData [ 'BlockUser' ] = $ post ; $ postData [ 'BlockUser' ] [ 'user_id' ] = Yii :: $ app -> user -> identity -> id ; $ model = new BlockUser ( ) ; if ( $ model -> load ( $ postData ) && $ model -> validate ( ) ) { $ model -> save ( ) ; } return $ model ; }
Creates a new BlockUser model.
Creates a new BlockUser model .