class
Illuminate
/
Auth
/
Access
/
Response
You are viewing an older version of the documentation. For the latest, please visit master documentation.
Response
Implements
Properties
protected
$allowed bool
Indicates whether the response was allowed.
Default: null
protected
$message string|null
The response message.
Default: null
protected
$code mixed
The response code.
Default: null
Methods
public
__construct ( $allowed , $message , $code ) : void
Create a new response.
Parameters
- $allowed bool
- $message string
- $code mixed
public
static
allow ( $message , $code ) : Response
Create a new "allow" Response.
Parameters
- $message string|null
- $code mixed
public
static
deny ( $message , $code ) : Response
Create a new "deny" Response.
Parameters
- $message string|null
- $code mixed
public
allowed ( ) : bool
Determine if the response was allowed.
public
denied ( ) : bool
Determine if the response was denied.
public
message ( ) : string|null
Get the response message.
public
code ( ) : mixed
Get the response code / reason.
public
toArray ( ) : array
Convert the response to an array.
public
__toString ( ) : string
Get the string representation of the message.