Skip to content

Commit ef44b1b

Browse files
authored
Update collections.md
Correct a typo/oversight in the method name being called. It was ::collect() but should have been ::collectArray()
1 parent 48b3708 commit ef44b1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/as-a-data-transfer-object/collections.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class SongData extends Data
9292
Now when collecting an array data objects a `SongCollection` will be returned:
9393

9494
```php
95-
SongData::collect([
95+
SongData::collectArray([
9696
['title' => 'Never Gonna Give You Up', 'artist' => 'Rick Astley'],
9797
['title' => 'Living on a prayer', 'artist' => 'Bon Jovi'],
9898
]); // returns an SongCollection of SongData objects

0 commit comments

Comments
 (0)