<?php

namespace App\Middleware;

use App\Utils\View;

class AdminMiddleware
{
    public function handle()
    {
        if (!isset($_SESSION['user_role']) || $_SESSION['user_role'] !== 'admin') {
            View::redirect('/login');
            return false;
        }
        return true;
    }
}
