Repository navigation
Added groupBy method to IndexedCache
Example:
$colorcache = new ColorCache();
$collection = new ColorCollection([
new Color(1, 'green'),
new Color(2, 'blue'),
new Color(3, 'blue'),
new Color(4, 'green')
]);
$colorcache->warm($collection);
$grouped = $colorcache->groupBy('color');$grouped will be a LazyCollection with Collections of grouped items inside.