groupBy

Typically used to combine aggregate functions to group result sets based on one or more columns.

The group method has only one argument and can only use strings.

Use

$builder->groupBy('is_vip')->get('getTable');
$builder->groupBy('is_vip,level')->get('getTable');

Pass the instructions

Method prototype

function groupBy($groupByField)
  • $groupByField string Grouping field