-
Notifications
You must be signed in to change notification settings - Fork 3
Set Cookie for PSR 7
sunrise-php edited this page Jan 7, 2019
·
1 revision
Learn more about Sunrise Header Kit
composer require sunrise/http-header-kit
use Sunrise\Http\Header\HeaderSetCookie;
public function process(
ServerRequestInterface $request,
RequestHandlerInterface $handler) : ResponseInterface
{
// some code
$header = new HeaderSetCookie('foo', 'bar', new \DateTime('+1 hour'));
$response = $header->addToMessage($response);
// some code
}
Have questions?
Ask your questions in our chat:
Get more features for your application using Awesome PSR-15 Middleware