Dependent dropdowns
public function dependent_dropdowns()
{
$xcrud = get_xcrud();
$xcrud->table('consultation');
$xcrud->relation('office','offices','officeCode','city');
$xcrud->relation('manager','employees','employeeNumber',array('firstName','lastName'),'','','',' ','','officeCode','office');
$xcrud->relation('country','meta_location','id','local_name','type = \'CO\'');
$xcrud->relation('region','meta_location','id','local_name','type = \'RE\'','','','','','in_location','country');
$xcrud->relation('city','meta_location','id','local_name','type = \'CI\'','','','','','in_location','region');
$data['content'] = $xcrud->render();
return view('demos', $data);
}
Consultation
Consultation
# | Name | Date | Office | Manager | Country | Region | City | |
1 | | | | | | | | |
2 | | | | | | | | |
3 | 1 | 17.02.2024 | Paris | Martin Gerard | Comoros
| Anjouan
| | |
4 | | | | | | | | |
5 | | | | | | | | |
6 | | | | | | | | |
7 | | | | | | | | |
8 | | | Sydney | Martin Gerard | Australia
| Queensland
| Bargara | |
9 | | | | | | | | |