Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. protected function addCookieToResponse($request, $response)
  2. {
  3. $config = config('session');
  4.  
  5. $response->headers->setCookie(
  6. new Cookie(
  7. 'XSRF-TOKEN', $request->session()->token(), $this->availableAt(60 * $config['lifetime']),
  8. $config['path'], $config['domain'], $config['secure'], false, false, $config['same_site'] ?? null
  9. )
  10. );
  11.  
  12. return $response;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement