<?php
namespace App\Middleware;

class RBAC
{
    public static function check($resource,$action)
    {
        if (function_exists('can') && can($resource,$action)) {
            return true;
        }

        http_response_code(403);
        die("Access Denied by RBAC");
    }
}
