/** * Creates a new model. * If creation is successful, the browser will be redirected to the 'view' page. */ public function actionCreate() { $model = new Katagory(); // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if (isset($_POST['Katagory'])) { $model->attributes = $_POST['Katagory']; if ($model->save()) { $this->redirect(array('view', 'id' => $model->id_katagory)); } } $this->render('create', array('model' => $model)); }
public function actionAKatagorys() { $Katagory = new Katagory(); $Views = View::model()->findAll(); $Menus = Menu::model()->findAll(); if (isset($_POST['Katagory'])) { $Katagory->attributes = $_POST['Katagory']; if ($Katagory->save()) { $this->redirect(array('lkatagorys', 'fitback' => 4)); } } $this->render('akatagorys', array('Katagory' => $Katagory, 'Views' => $Views, 'Menus' => $Menus)); }