Labels and classes

label() method will change all field names in all screens, column_name() - only grid headers.


public function labels_and_classes()
{
  $xcrud = get_xcrud();
  $xcrud->table('employees');
  $xcrud->label('lastName','Surname');
  $xcrud->label('firstName','Name');
  $xcrud->label('officeCode','Office code')->label('reportsTo','Reports to')->label('jobTitle','Job title');
  $xcrud->column_name('firstName', 'NaMe!'); // only column renaming
  $xcrud->column_class('extension','align-center font-bold'); // any classname
  // predefined classnames: align-left, align-right, align-center, font-bold, font-italic, text-underline
    
  $data['content'] = $xcrud->render();
  
  return view('demos', $data);
}

Employees

#SurnameNaMe!ExtensionEmailOffice codeReports toJob title 
1MUrrDianeCC123ty89cvcvthyht@hh.com2855President6
2GerardMartinx2312ty89cvcvthyht@hh.com4Sales Rep
3Chieni5Patrickfgjhjpchieni@gmail.com4VP Marketing
4YgyGggFgbj7@hj.com15Ff
5DARA2DATRATRETANTAdara@gmail.com5454GIGIONE
6aaabbb dfghjklaaa@aa999a.com3aaa
7
8
9
Search