Available for select projects New York · Working worldwide
Rappasoft LLC
Menu

Laravel Livewire Tables / Documentation / v4

Avg Columns (beta)

Installation, configuration, and usage guidance maintained with the project.

Avg columns provide an easy way to display the "Average" of a field on a relation.

1AvgColumn::make('Average Related User Age')
2 ->setDataSource('users','age')
3 ->sortable(),

The "sortable()" callback can accept a callback, or you can use the default behaviour, which calculates the correct field to sort on.

Please also see the following for other available methods: