Skip to content

Commit 26394a1

Browse files
committed
formatting
1 parent 60850c9 commit 26394a1

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

requests.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,9 @@ All cookies created by the Laravel framework are encrypted and signed with an au
273273

274274
$value = $request->cookie('name');
275275

276-
Alternatively, you can use the `Cookie` facade:
276+
Alternatively, you may use the `Cookie` facade to access cookie values:
277277

278-
Cookie::get('name');
278+
$value = Cookie::get('name');
279279

280280
#### Attaching Cookies To Responses
281281

@@ -291,14 +291,12 @@ The `cookie` method also accepts a few more arguments which are used less freque
291291
'name', 'value', $minutes, $path, $domain, $secure, $httpOnly
292292
);
293293

294-
Alternatively, you can use the `Cookie` facade to queue cookies. The `queue` method accepts both a `Cookie` instance or a list of arguments to create one:
294+
Alternatively, you can use the `Cookie` facade to "queue" cookies for attachment to the outgoing response from your application. The `queue` method accepts a `Cookie` instance or the arguments needed to create a `Cookie` instance. These cookies will be attached to the outgoing response before it is sent to the browser:
295295

296296
Cookie::queue(Cookie::make('name', 'value', $minutes));
297297

298298
Cookie::queue('name', 'value', $minutes);
299299

300-
These cookies will be attached to the response on its creation.
301-
302300
#### Generating Cookie Instances
303301

304302
If you would like to generate a `Symfony\Component\HttpFoundation\Cookie` instance that can be given to a response instance at a later time, you may use the global `cookie` helper. This cookie will not be sent back to the client unless it is attached to a response instance:

responses.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,12 @@ The `cookie` method also accepts a few more arguments which are used less freque
7777

7878
->cookie($name, $value, $minutes, $path, $domain, $secure, $httpOnly)
7979

80-
Alternatively, you can use the `Cookie` facade to queue cookies. The `queue` method accepts both a `Cookie` instance or a list of arguments to create one:
80+
Alternatively, you can use the `Cookie` facade to "queue" cookies for attachment to the outgoing response from your application. The `queue` method accepts a `Cookie` instance or the arguments needed to create a `Cookie` instance. These cookies will be attached to the outgoing response before it is sent to the browser:
8181

8282
Cookie::queue(Cookie::make('name', 'value', $minutes));
8383

8484
Cookie::queue('name', 'value', $minutes);
8585

86-
These cookies will be attached to the response on its creation.
87-
8886
<a name="cookies-and-encryption"></a>
8987
#### Cookies & Encryption
9088

@@ -221,7 +219,7 @@ The `download` method may be used to generate a response that forces the user's
221219
return response()->download($pathToFile);
222220

223221
return response()->download($pathToFile, $name, $headers);
224-
222+
225223
return response()->download($pathToFile)->deleteFileAfterSend(true);
226224

227225
> {note} Symfony HttpFoundation, which manages file downloads, requires the file being downloaded to have an ASCII file name.

0 commit comments

Comments
 (0)