<?php

namespace Core\Middleware;

use Core\Auth;
use Core\Response;

class DirectorMiddleware
{
    public function handle($router)
    {
        $user = Auth::user();
        if ($user && $user['role'] === 'director') {
            return true;
        }
        Response::redirect('/dashboard');
        return false;
    }
}
