Skip to content

Commit 05e295d

Browse files
committed
update response helper section for new header method
1 parent 1a7e583 commit 05e295d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Diff for: 4.0/responses/README.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,20 @@ return DataResponse::make($model)->withHeader('X-Foo', 'Bar');
366366

367367
#### withHeaders
368368

369-
The `withHeaders` method allows you to set multiple headers on the response:
369+
The `withHeaders` method allows you to set multiple headers on the response. These headers are merged with any existing
370+
headers.
370371

371372
```php
372373
return DataResponse::make($model)->withHeaders([
373374
'X-Foo' => 'Bar',
374375
'X-Baz' => 'Bat',
375376
]);
376377
```
378+
379+
#### withoutHeaders
380+
381+
The `withoutHeaders` method allows you to remove headers from the response:
382+
383+
```php
384+
return DataResponse::make($model)->withoutHeaders('X-Foo', 'X-Bar');
385+
```

0 commit comments

Comments
 (0)