public function cookie($key = null, $default = null)
    {
        $cookies = $this->getCookieParams();

        return is_null($key) ? $cookies : data_get($cookies, $key, $default);
    }
public function cookie($key = null, $default = null)
    {
        $cookies = $this->getCookieParams();

        return is_null($key) ? $cookies : data_get($cookies, $key, $default);
    }
public function cookie ( $ key = null , $ default = null ) { $ cookies = $ this -> getCookieParams ( ) ; return is_null ( $ key ) ? $ cookies : data_get ( $ cookies , $ key , $ default ) ; }
Retrieve a cookie from the request.

@param string            $key
@param null|array|string $default

@return array|string
Retrieve a cookie from the request .