Skip to content

Commit c20e282

Browse files
committed
issue-41649 collection not possible group by with Stringable
1 parent 6f743e2 commit c20e282

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Collections/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ public function groupBy($groupBy, $preserveKeys = false)
488488
}
489489

490490
foreach ($groupKeys as $groupKey) {
491-
$groupKey = is_bool($groupKey) ? (int) $groupKey : $groupKey;
491+
$groupKey = is_bool($groupKey) ? (int) $groupKey : (string) $groupKey;
492492

493493
if (! array_key_exists($groupKey, $results)) {
494494
$results[$groupKey] = new static;

0 commit comments

Comments
 (0)