示例#1
0
 public static function isAvailable($resource, $method)
 {
     if (App::env() === "cli") {
         return true;
     }
     list($controller, $action) = Url::route($resource, $method);
     $module = Url::module($controller);
     return Module::isActive($module) && Access::isHandlerPermitted($resource, $action);
 }