/** * Retrieve the average of the values of a given column. * * @param string $column * @return mixed */ public function avg($column) { $this->compileWheres(); $result = $this->query->avg($column)->rDefault(null)->run()->toNative(); return $result; }