Send cookie with other headers in SLIM 3

I have a some code
$newResponse = $response->withStatus(200)
->withHeader(‘location’, ‘/’);
return FigResponseCookies::set($newResponse, SetCookie::create(‘cookie’)->withValue(‘cookie’)->withPath("/"))

It’s not working for me, cookie is clean after this code, can you help me?

The code in your example is correct and works responding with both location and set-cookie headers.

Please check your characters encoding. I had to adjust some characters like ‘ …