Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Laravel 5.4.18 changes (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
besologic authored Apr 12, 2017
1 parent 390b206 commit 86e9675
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Illuminate/Support/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,8 @@ public function groupBy($groupBy, $preserveKeys = false)
}

foreach ($groupKeys as $groupKey) {
$groupKey = is_bool($groupKey) ? (int) $groupKey : $groupKey;

if (! array_key_exists($groupKey, $results)) {
$results[$groupKey] = new static;
}
Expand Down

0 comments on commit 86e9675

Please sign in to comment.