public function actionIndex()
 {
     $model = new Coupon('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Coupon'])) {
         $model->attributes = $_GET['Coupon'];
     }
     $this->render('index', ['model' => $model]);
 }
Example #2
0
 public function actionIndex()
 {
     $model = new Coupon('search');
     $attributes = Yii::app()->getRequest()->getQuery('Coupon');
     $model->unsetAttributes();
     if ($attributes) {
         $model->attributes = $attributes;
     }
     $this->render('index', ['model' => $model]);
 }
Example #3
0
 public function actionAdmin()
 {
     IsAuth::Admin();
     $model = new Coupon('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Coupon'])) {
         $model->attributes = $_GET['Coupon'];
     }
     $this->render('admin', array('model' => $model));
 }