public function max($attr)
    {
        $builder = $this->_makeBuilderForAggregations(" max($attr) ");
        return $this->_executeAndReturnFirst($builder, $this->_vals);
    }
public function max($attr)
    {
        $builder = $this->_makeBuilderForAggregations(" max($attr) ");
        return $this->_executeAndReturnFirst($builder, $this->_vals);
    }
public function max ( $ attr ) { $ builder = $ this -> _makeBuilderForAggregations ( " max($attr) " ) ; return $ this -> _executeAndReturnFirst ( $ builder , $ this -> _vals ) ; }
Return collection attribute maximum value

Example:
echo Person::all()->max("age");

@param string $attr attribute

@return mixed maximum
Return collection attribute maximum value