Conversie codeigniter 4
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
class Main extends BaseController
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
// Check for maintenance mode
|
||||
// if ($_ENV['MAINTENANCE'] ?? false) return view('underconstruction');
|
||||
|
||||
if (!$this->authenticated) {
|
||||
return $this->showLoginPage();
|
||||
}
|
||||
|
||||
$pages = \Page::getPages($this->user);
|
||||
|
||||
return view('main_view', ['pages' => $pages]);
|
||||
}
|
||||
|
||||
private function showLoginPage()
|
||||
{
|
||||
return view('pages/login/login_view');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user