Request::hasCookie PHP Method

hasCookie() public static method

Determine if a cookie is set on the request.
public static hasCookie ( string $key ) : boolean
$key string
return boolean
        public static function hasCookie($key)
        {
            return \Illuminate\Http\Request::hasCookie($key);
        }

Usage Example

 public function testHasCookie()
 {
     $this->assertThat($this->object->hasCookie('undefined cookie'), $this->equalTo(false));
     $this->assertThat($this->object->hasCookie('user'), $this->equalTo(true));
 }