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 (7 items)
1141IN44625865071.26
2141JE105477120166.58
3141JN35528049539.37
4141JN72201040206.2
5141KT5257863843.55
6141MC4694635420.74
7141NU62770626155.91
total400403.61
144 (2 items)
8144IR84630336005.71
9144LA6856787674.94
total43680.65
145 (1 items)
10145CN3285454710.73
total4710.73
Search