UnauthorizedException
class UnauthorizedException extends HttpException
Methods
static UnauthorizedException
forRoles(array $roles)
Create an exception for missing roles.
static UnauthorizedException
forPermissions(array $permissions)
Create an exception for missing permissions.
static UnauthorizedException
forRolesOrPermissions(array $rolesOrPermissions)
Create an exception for missing roles or permissions.
static UnauthorizedException
missingTraitHasRoles(Authenticatable|Authorizable $user)
Create an exception for a user missing the HasRoles trait.
static UnauthorizedException
notLoggedIn()
Create an exception for a missing authenticated user.
array
getRequiredRoles()
Get the roles required by the failed check.
array
getRequiredPermissions()
Get the permissions required by the failed check.
Details
at line 33
static UnauthorizedException
forRoles(array $roles)
Create an exception for missing roles.
at line 52
static UnauthorizedException
forPermissions(array $permissions)
Create an exception for missing permissions.
at line 71
static UnauthorizedException
forRolesOrPermissions(array $rolesOrPermissions)
Create an exception for missing roles or permissions.
at line 88
static UnauthorizedException
missingTraitHasRoles(Authenticatable|Authorizable $user)
Create an exception for a user missing the HasRoles trait.
at line 98
static UnauthorizedException
notLoggedIn()
Create an exception for a missing authenticated user.
at line 108
array
getRequiredRoles()
Get the roles required by the failed check.
at line 118
array
getRequiredPermissions()
Get the permissions required by the failed check.