src/Primitive/Container/Container.php
protected function getGroupByKey($groupBy, $key, $value)
    {
        if ( ! is_string($groupBy) && $groupBy instanceof Closure)
        {
            return $groupBy($value, $key);
        }

        return _data_get($value, $groupBy);
    }
protected function getGroupByKey($groupBy, $key, $value)
    {
        if ( ! is_string($groupBy) && $groupBy instanceof Closure)
        {
            return $groupBy($value, $key);
        }

        return _data_get($value, $groupBy);
    }
Get the "group by" key value.

@param  \Closure|string  $groupBy
@param  string  $key
@param  mixed  $value
@return string