Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion http-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ Another way of working with concurrent requests in Laravel is to use the `batch`

```php
use Illuminate\Http\Client\Batch;
use Illuminate\Http\Client\ConnectionException;
use Illuminate\Http\Client\RequestException;
use Illuminate\Http\Client\Response;
use Illuminate\Support\Facades\Http;
Expand All @@ -578,7 +579,7 @@ $responses = Http::batch(fn (Batch $batch) => [
// An individual request has completed successfully...
})->then(function (Batch $batch, array $results) {
// All requests completed successfully...
})->catch(function (Batch $batch, int|string $key, Response|RequestException $response) {
})->catch(function (Batch $batch, int|string $key, Response|RequestException|ConnectionException $response) {
// First batch request failure detected...
})->finally(function (Batch $batch, array $results) {
// The batch has finished executing...
Expand Down