src/controllers/DefaultController.php
/**
	 * Creates a new Role model.
	 * If creation is successful, the browser will be redirected to the 'view' page.
	 * @return mixed
	 */
Creates a new Role model.
If creation is successful, the browser will be redirected to the 'view' page.
@return mixed
Creates a new Role model . If creation is successful the browser will be redirected to the ' view ' page . @return mixed
public function actionCreate() {
		$model = new Role();
		if ($model->load(Yii::$app->request->post()) && $model->save()) {
			return $this->redirect([
				'update',
				'id' => $model->id,
			]);
		} else {
			return $this->render('create', [
				'model' => $model,
			]);
		}
	}
public function actionCreate ( ) { $ model = new Role ( ) ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) && $ model -> save ( ) ) { return $ this -> redirect ( [ 'update' , 'id' => $ model -> id , ] ) ; } else { return $ this -> render ( 'create' , [ 'model' => $ model , ] ) ; } }
Creates a new Role model.
Creates a new Role model .