Skip to content
Permalink
Browse files

Update doc block for withCookie()

  • Loading branch information...
markstory committed Dec 9, 2016
1 parent 36b067c commit 720fb86b02fcfc9b05c7990a1061201482bf8ee0
Showing with 21 additions and 1 deletion.
  1. +21 −1 src/Network/Response.php
@@ -1945,8 +1945,28 @@ public function cookie($options = null)
/**
* Create a new response with a cookie set.
*
* ### Options
*
* - `name`: The Cookie name
* - `value`: Value of the cookie
* - `expire`: Time the cookie expires in
* - `path`: Path the cookie applies to
* - `domain`: Domain the cookie is for.
* - `secure`: Is the cookie https?
* - `httpOnly`: Is the cookie available in the client?
*
* ### Examples
*
* ```
* // set scalar value with defaults
* $response = $response->withCookie('remember_me', 1);
*
* // customize cookie attributes
* $response = $response->withCookie('remember_me', ['path' => '/login']);
* ```
*
* @param string $name The name of the cookie to set.
* @param array|string $data Either a string value, or an array of cookie data.
* @param array|string $data Either a string value, or an array of cookie options.
* @return static
*/
public function withCookie($name, $data = '')

0 comments on commit 720fb86

Please sign in to comment.
You can’t perform that action at this time.