File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -148,18 +148,18 @@ public static function createFromRecord($record)
148148
149149 public static function createModelsFromRecordSet (BaseCollection $ records ): Collection
150150 {
151- // return an empty Eloquent/Collection (or a collection of the specific model type ) if an empty collection was
151+ // return an empty Eloquent/Collection (or the custom collection specified in the model) if an empty collection was
152152 // passed in.
153153 if ($ records ->count () === 0 ) {
154- return (new static ())->newCollection ([] );
154+ return (new static ())->newCollection ();
155155 }
156156
157157 // Records passed in weren't empty, so process the records
158158 $ mappedRecords = $ records ->map (function ($ record ) {
159159 return static ::createFromRecord ($ record );
160160 });
161161
162- // return the filled Eloquent/Collection (or a collection of the specific model type if possible )
162+ // return the filled Eloquent/Collection (or the custom collection specified in the model)
163163 return (new static ())->newCollection ($ mappedRecords ->all ());
164164 }
165165
You can’t perform that action at this time.
0 commit comments