RoleMiddleware
class RoleMiddleware
Methods
static string
using(array|string|UnitEnum $role, string|null $guard = null)
Specify the role and guard for the middleware.
static string
parseRolesToString(array|string|UnitEnum $role)
Parse the roles into a pipe-delimited string.
Details
at line 23
__construct(Factory $auth)
Create a new middleware instance.
at line 30
Response
handle(Request $request, Closure $next, mixed $role, string|null $guard = null)
Handle an incoming request.
at line 63
static string
using(array|string|UnitEnum $role, string|null $guard = null)
Specify the role and guard for the middleware.
at line 75
static protected string
parseRolesToString(array|string|UnitEnum $role)
Parse the roles into a pipe-delimited string.