From ef44b1b68a216ec996ce7fea6b149de85bb76635 Mon Sep 17 00:00:00 2001 From: Derek Martin Date: Wed, 10 Jul 2024 14:47:16 -0400 Subject: [PATCH] Update collections.md Correct a typo/oversight in the method name being called. It was ::collect() but should have been ::collectArray() --- docs/as-a-data-transfer-object/collections.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/as-a-data-transfer-object/collections.md b/docs/as-a-data-transfer-object/collections.md index 3b67700bc..8d5ab3d51 100644 --- a/docs/as-a-data-transfer-object/collections.md +++ b/docs/as-a-data-transfer-object/collections.md @@ -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