class
Illuminate
/
Cookie
/
Middleware
/
EncryptCookies
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
EncryptCookies
Properties
protected
$except
array
The names of the cookies that should not be encrypted.
Default: []
protected
static
$serialize bool
Indicates if cookies should be serialized.
Default: false
Methods
public
__construct ( Encrypter $encrypter ) : void
Create a new CookieGuard instance.
Parameters
- $encrypter Encrypter
public
disableFor ( $name ) : void
Disable encryption for the given cookie name(s).
Parameters
- $name string|array
public
handle ( $request , Closure $next ) : Symfony\...\Response
Handle an incoming request.
Parameters
protected
decrypt ( Symfony\...\Request $request ) : Symfony\...\Request
Decrypt the cookies on the request.
Parameters
- $request Symfony\...\Request
protected
validateValue ( string $key , $value ) : string|array|null
Validate and remove the cookie value prefix from the value.
Parameters
- $key string
- $value string
protected
validateArray ( string $key , array $value ) : array
Validate and remove the cookie value prefix from all values of an array.
Parameters
- $key string
- $value array
protected
decryptCookie ( $name , $cookie ) : string|array
Decrypt the given cookie and return the value.
Parameters
- $name string
- $cookie string|array
protected
decryptArray ( array $cookie ) : array
Decrypt an array based cookie.
Parameters
- $cookie array
protected
encrypt ( Symfony\...\Response $response ) : Symfony\...\Response
Encrypt the cookies on an outgoing response.
Parameters
- $response Symfony\...\Response
protected
duplicate ( Symfony\...\Cookie $cookie , $value ) : Symfony\...\Cookie
Duplicate a cookie with a new value.
Parameters
- $cookie Symfony\...\Cookie
- $value mixed
public
isDisabled ( $name ) : bool
Determine whether encryption has been disabled for the given cookie.
Parameters
- $name string
public
static
serialized ( $name ) : bool
Determine if the cookie contents should be serialized.
Parameters
- $name string