public static function can($name) { $user = Auth::User(); return $user->getRole()->loadCustomMethod('group')->havePermission($name); }