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
| # | Surname | NaMe! | Extension | Office code | Reports to | Job title | ||
|---|---|---|---|---|---|---|---|---|
| 1 | MUrr | DianeCC | 123 | ty89cvcvthyht@hh.com | 3333 | 855 | President64 | |
| 2 | Gerard | Martin | x2312 | ty89cvcvthyht@hh.com | 123 | Sales Rep | ||
| 3 | Ygy | Ggg | Fgbj7@hj.com | 1233 | 5 | Ff | ||
| 4 | DARA2 | DATRATRE | TANTA | dara@gmail.com | 4 | 454 | GIGIONE | |
| 5 | aaa | bbb dfghjkl | aaa@aa999a.com | 3 | aaa | |||
| 6 | er | ytu | 1 | |||||
| 7 | aa | bb | 3 | |||||
| 8 | ||||||||
| 9 |