src/controllers/PageController.php
public function showPage($pageName = 'index')
    {
        if (!$this->page->exists($pageName)) {
            return \Response::view($this->theme.'.404', array('global' => $this->global), 404);
        }

        $page = $this->page->get($pageName);

        $viewParamaters = array(
            'global' => $this->global,
            'page' => $page
        );

        if (\View::exists($this->theme.'.'.$pageName)) {
            return \View::make($this->theme.'.'.$pageName, $viewParamaters);
        } else {
            return \View::make($this->theme.'.page', $viewParamaters);
        }
    }
public function showPage($pageName = 'index')
    {
        if (!$this->page->exists($pageName)) {
            return \Response::view($this->theme.'.404', array('global' => $this->global), 404);
        }

        $page = $this->page->get($pageName);

        $viewParamaters = array(
            'global' => $this->global,
            'page' => $page
        );

        if (\View::exists($this->theme.'.'.$pageName)) {
            return \View::make($this->theme.'.'.$pageName, $viewParamaters);
        } else {
            return \View::make($this->theme.'.page', $viewParamaters);
        }
    }
public function showPage ( $ pageName = 'index' ) { if ( ! $ this -> page -> exists ( $ pageName ) ) { return \ Response :: view ( $ this -> theme . '.404' , array ( 'global' => $ this -> global ) , 404 ) ; } $ page = $ this -> page -> get ( $ pageName ) ; $ viewParamaters = array ( 'global' => $ this -> global , 'page' => $ page ) ; if ( \ View :: exists ( $ this -> theme . '.' . $ pageName ) ) { return \ View :: make ( $ this -> theme . '.' . $ pageName , $ viewParamaters ) ; } else { return \ View :: make ( $ this -> theme . '.page' , $ viewParamaters ) ; } }
Show a single requested page.
@param  string $pageName The name of the page to show.
@return \View
Show a single requested page .