This commit is contained in:
Jaybe
2025-03-05 14:02:29 +09:00
commit 247a7808d3
357 changed files with 161196 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App\Controllers;
class PageController extends BaseController
{
public function index()
{
$page = new PageController();
return $page->view();
}
public function view($page = 'home')
{
if(!is_file(APPPATH . 'Views/pages/' . $page . '.php')) {
throw new \CodeIgniter\Exceptions\PageNotFoundException($page);
}
$data['title'] = ucfirst($page);
return view('pages/'.$page, $data);
}
}