/** * This is the default 'index' action that is invoked * when an action is not explicitly requested by users. */ public function actionIndex() { $model = new Reserva('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Reserva'])) { $model->attributes = $_GET['Reserva']; // var_dump($model); // die(); } $this->render('index', array('model' => $model)); // renders the view file 'protected/views/site/index.php' // using the default layout 'protected/views/layouts/main.php' // $this->render('index'); }
/** * Manages all models. */ public function actionAdmin() { $model = new Reserva('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Reserva'])) { $model->attributes = $_GET['Reserva']; } $this->render('admin', array('model' => $model)); }