Skip to content

Commit 2ba2ffc

Browse files
authored
[8.x] Clarify that lazy flattens the chunks (#6948)
1 parent 4ce3616 commit 2ba2ffc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eloquent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ Flight::where('departed', true)
356356
<a name="streaming-results-lazily"></a>
357357
### Streaming Results Lazily
358358

359-
The `lazy` method works similarly to [the `chunk` method](#chunking-results) in the sense that it executes the query in chunks. However, instead of passing each chunk into a callback, the `lazy` method returns a [`LazyCollection`](/docs/{{version}}/collections#lazy-collections) of Eloquent models, which lets you interact with the results as a single stream:
359+
The `lazy` method works similarly to [the `chunk` method](#chunking-results) in the sense that, behind the scenes, it executes the query in chunks. However, instead of passing each chunk directly into a callback as is, the `lazy` method returns a flattened [`LazyCollection`](/docs/{{version}}/collections#lazy-collections) of Eloquent models, which lets you interact with the results as a single stream:
360360

361361
```php
362362
use App\Models\Flight;

0 commit comments

Comments
 (0)