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