namespace IlluminateHttp;
trait ResponseTrait
{// a real trait be set
public function status()
{
return $this->getStatusCode();
}// Get the status code for the response.
public function content()
{
return $this->getContent();// get Content
}// Get the content of the response.
public function header($key, $value, $replace = true)
{
$this->headers->set($key, $value, $replace);
return $this;
}// Set a header on the response.
public function withHeaders(array $headers)
{
foreach ($headers as $key => $value) {
$this->headers->set($key, $value);
}
return $this;
}//with Headers
public function cookie($cookie)
{
return call_user_func_array([$this, 'withcookie'], func_get_args());
}//Add a cookie
public function withcookie($cookie)
{
if (is_string($cookie) && function_exists('cookie')) {
$cookie = call_user_func_array('cookie', func_get_args());
}
$this->headers->setcookie($cookie);
return $this;
}//with cookie
}



