add group by feature to datatable
This commit is contained in:
@@ -28,7 +28,8 @@ class DataTable
|
||||
array $allowedFilters = [],
|
||||
array $allowedRelations = [],
|
||||
array $allowedSortings = [],
|
||||
array $allowedSelects = []
|
||||
array $allowedSelects = [],
|
||||
?array $allowedGroupBy = null
|
||||
): array
|
||||
{
|
||||
|
||||
@@ -43,7 +44,8 @@ class DataTable
|
||||
$sorting,
|
||||
$rels,
|
||||
$allowedFilters,
|
||||
$allowedSortings
|
||||
$allowedSortings,
|
||||
$allowedGroupBy
|
||||
);
|
||||
|
||||
$query = $this->makeQueryFromModel($mixed);
|
||||
@@ -52,7 +54,8 @@ class DataTable
|
||||
->setAllowedFilters($allowedFilters)
|
||||
->setAllowedRelations($allowedRelations)
|
||||
->setAllowedSortings($allowedSortings)
|
||||
->setAllowedSelects($allowedSelects);
|
||||
->setAllowedSelects($allowedSelects)
|
||||
->setAllowedGroupBy($allowedGroupBy);
|
||||
|
||||
return $dataTableService->getData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user