how to get the average of a column in laravel code example Example: laravel get average from a column $avgStar = Model::avg('star');