23 lines
364 B
PHP
23 lines
364 B
PHP
<?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(),
|
|
]);
|
|
}
|
|
} |