Ejemplo n.º 1
0
 /**
  * Lists all Landing models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => Landing::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
Ejemplo n.º 2
0
 protected function findCodeModel($code)
 {
     if (($model = Landing::find()->where(['code' => $code])->one()) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }