Skip to content

Commit

Permalink
Update collections.md
Browse files Browse the repository at this point in the history
Correct a typo/oversight in the method name being called.
It was ::collect() but should have been ::collectArray()
  • Loading branch information
lofye authored Jul 10, 2024
1 parent 48b3708 commit ef44b1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/as-a-data-transfer-object/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class SongData extends Data
Now when collecting an array data objects a `SongCollection` will be returned:

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

0 comments on commit ef44b1b

Please sign in to comment.