…All() twin that walks it for you: a LazyCollection that fetches a page as you iterate and stops
after the last.
filter(), take(10), chunk(100), first().
Only some fields
When you need only a few fields of every document, its id above all, each list method that takesfields also has a …Pick() twin. It walks every page too, 100 documents a page, and each item is a
plain array of the document’s id and the fields you named:
How each list pages
- By page
- By cursor
- Backwards
Content lists and members (until
pages), the media lists (from total and perPage; their page
size is limit), form submissions, the request log, the access and conversion viewers.It can never loop: an answer for another page than the one asked for, or the same cursor twice, throws.
An answer that names its page but no page count throws too, rather than stopping quietly.
One page
The list method itself answers one page, with where you are:Watching every call
Every call runs on Laravel’s HTTP client, so Telescope and Pulse see it, andlog_channel (in
config/fetchski-attract.php) writes one line per call: site, method, path, status and time.
Next: testing
Three-line tests, and an Action for any method.