modules/admin/controllers/ColorController.php
/**
     * Creates a new Color model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     * @return mixed
     */
Creates a new Color model.
If creation is successful, the browser will be redirected to the 'view' page.
@return mixed
Creates a new Color model . If creation is successful the browser will be redirected to the ' view ' page . @return mixed
public function actionCreate()
    {
        $model = new Color();
        $model->scenario = Color::SCENARIO_ADD_COLOR;
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            \Yii::$app->getSession()->setFlash(Growl::TYPE_SUCCESS, 'Color created successfully.');
            return $this->redirect(['index']);
        }
        return $this->render('create', [
            'model' => $model,
        ]);
    }
public function actionCreate ( ) { $ model = new Color ( ) ; $ model -> scenario = Color :: SCENARIO_ADD_COLOR ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) && $ model -> save ( ) ) { \ Yii :: $ app -> getSession ( ) -> setFlash ( Growl :: TYPE_SUCCESS , 'Color created successfully.' ) ; return $ this -> redirect ( [ 'index' ] ) ; } return $ this -> render ( 'create' , [ 'model' => $ model , ] ) ; }
Creates a new Color model.
Creates a new Color model .