Commaaa2
This commit is contained in:
@@ -32,6 +32,16 @@ trait ResponseTrait
|
||||
return $this->getStatusCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the status text for the response.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function statusText()
|
||||
{
|
||||
return $this->statusText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the content of the response.
|
||||
*
|
||||
@@ -116,6 +126,25 @@ trait ResponseTrait
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Expire a cookie when sending the response.
|
||||
*
|
||||
* @param \Symfony\Component\HttpFoundation\Cookie|mixed $cookie
|
||||
* @param string|null $path
|
||||
* @param string|null $domain
|
||||
* @return $this
|
||||
*/
|
||||
public function withoutCookie($cookie, $path = null, $domain = null)
|
||||
{
|
||||
if (is_string($cookie) && function_exists('cookie')) {
|
||||
$cookie = cookie($cookie, null, -2628000, $path, $domain);
|
||||
}
|
||||
|
||||
$this->headers->setCookie($cookie);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the callback of the response.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user