Files
website/app/controllers/AdminController.php
Riyyi 077e4c434c Everywhere: Add config and cache page
Add config database table and enable crud page.
Also add cache controller, model and view and routes for these pages.

Make the JavaScript display a message when changing the state of
development mode.
2021-08-27 16:15:03 +02:00

25 lines
395 B
PHP

<?php
namespace App\Controllers;
use App\Classes\User;
class AdminController extends PageController {
public function indexAction(): void {
$this->router->service()->user = User::getUser();
parent::view('', 'Admin');
}
public function toggleAction(): void {
User::toggle();
echo User::getToggle() ? '1' : '0';
}
public function syntaxAction(): void {
parent::view();
}
}