public function max($key = null)
    {
        return $this->reduce(function ($result, $item) use ($key) {
            $value = data_get($item, $key);

            return is_null($result) || $value > $result ? $value : $result;
        });
    }