src/Concerns/InteractsWithCookies.php
public function cookie($name, $value = null, $expiry = null, array $options = [])
    {
        if (! is_null($value)) {
            return $this->addCookie($name, $value, $expiry, $options);
        }

        if ($cookie = $this->driver->manage()->getCookieNamed($name)) {
            return decrypt(rawurldecode($cookie['value']), $unserialize = false);
        }
    }
public function cookie($name, $value = null, $expiry = null, array $options = [])
    {
        if (! is_null($value)) {
            return $this->addCookie($name, $value, $expiry, $options);
        }

        if ($cookie = $this->driver->manage()->getCookieNamed($name)) {
            return decrypt(rawurldecode($cookie['value']), $unserialize = false);
        }
    }
public function cookie ( $ name , $ value = null , $ expiry = null , array $ options = [ ] ) { if ( ! is_null ( $ value ) ) { return $ this -> addCookie ( $ name , $ value , $ expiry , $ options ) ; } if ( $ cookie = $ this -> driver -> manage ( ) -> getCookieNamed ( $ name ) ) { return decrypt ( rawurldecode ( $ cookie [ 'value' ] ) , $ unserialize = false ) ; } }
Get or set an encrypted cookie's value.

@param  string  $name
@param  string|null  $value
@param  int|DateTimeInterface|null  $expiry
@param  array  $options
@return string
Get or set an encrypted cookie s value .