first commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Core\Auth;
|
||||
use App\Core\View;
|
||||
|
||||
class DashboardController
|
||||
{
|
||||
public function index(): void
|
||||
{
|
||||
if (!Auth::check()) {
|
||||
header('Location: /login');
|
||||
exit;
|
||||
}
|
||||
|
||||
View::render('dashboard/index', [
|
||||
'user' => Auth::user(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user