<?php
namespace App\Controllers;

class Pages extends BaseController
{
    public function view($page)
    {
        if (!file_exists(APPPATH . 'Views/' . $page . '.php')) {
            throw new \CodeIgniter\Exceptions\PageNotFoundException($page);
        }
        return view($page);
    }
}
