Example #1
0
 /**
  * Displays static page.
  * @param $slug
  * @return string
  * @throws NotFoundHttpException
  */
 public function run($slug)
 {
     $model = new Paginas();
     if (($pagina = $model->obtenerPaginaPorSlug($slug)) === null) {
         throw new NotFoundHttpException('La página solicitada no existe.');
     }
     return $this->controller->render('pagina-estatica', ['model' => $pagina]);
 }