0) { if ( !($this->page = (new PageModel()) ->where('slug', $params[0]) ->first()) ) { throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound(); } } return $this->$method(); } public function index() { // The page cache is set to a decade so it is deleted manually upon page update $this->cachePage(DECADE); $data = [ 'page' => $this->page, ]; return view('page', $data); } }