MissingScopeException
class MissingScopeException extends AuthorizationException
Properties
| protected Response|null | $response | The authorization response returned by the gate. |
from AuthorizationException |
| protected int|null | $status | The HTTP response status code. |
from AuthorizationException |
| protected string[] | $scopes | The scopes that the user did not have. |
Methods
__construct(array|string $scopes = [], string|null $message = 'Invalid scope(s) provided.')
Create a new missing scope exception.
withStatus(int|null $status)
Set the HTTP response status code.
asNotFound()
Set the HTTP response status code to 404.
toResponse()
Create a deny response object from this exception.
array
scopes()
Get the scopes that the user did not have.
Details
at line 24
__construct(array|string $scopes = [], string|null $message = 'Invalid scope(s) provided.')
Create a new missing scope exception.
in
AuthorizationException at line 35
Response|null
response()
Get the response from the gate.
in
AuthorizationException at line 45
AuthorizationException
setResponse(Response|null $response)
Set the response from the gate.
in
AuthorizationException at line 57
AuthorizationException
withStatus(int|null $status)
Set the HTTP response status code.
in
AuthorizationException at line 69
AuthorizationException
asNotFound()
Set the HTTP response status code to 404.
in
AuthorizationException at line 77
bool
hasStatus()
Determine if the HTTP status code has been set.
in
AuthorizationException at line 85
int|null
status()
Get the HTTP status code.
in
AuthorizationException at line 93
Response
toResponse()
Create a deny response object from this exception.
at line 36
array
scopes()
Get the scopes that the user did not have.