Field Grouping

Simple column grouping, summation of a column value and inline editing.


public function field_grouping()
{
  $xcrud = get_xcrud();
  $xcrud->table('payments');
  $xcrud->unset_remove();
  $xcrud->group_by_columns('customerNumber');//Allows only one field
  $xcrud->group_sum_columns('amount');//Allows only one field
  $xcrud->columns('customerNumber,checkNumber,amount');
  $xcrud->fields_inline('customerNumber,checkNumber,paymentDate,amount');
    
  $data['content'] = $xcrud->render();
  
  return view('demos', $data);
}

Payments

#CustomernumberChecknumberAmount 
141 (6 items)
1141JE105477120166.58
2141JN35528049539.37
3141JN72201040206.2
4141KT5257863843.55
5141MC4694635420.74
6141NU62770626155.91
total335332.35
144 (2 items)
7144IR84630336005.71
8144LA6856787674.94
total43680.65
145 (2 items)
9145CN3285454710.73
10145ED3932228211.7
total32922.43
Search