Open rapgithub opened 5 years ago
With latest changes in MasterCrud you should be able to do like this. See _crud
key - that's how you can pass properties to sub-cruds.
There is also key _tabs
. That's how you can pass some properties to tabs view if needed.
$crud = $app->add([
'\atk4\mastercrud\MasterCRUD',
]);
$m = $crud->setModel(new Cities($app->db),
[
'_crud' => ['quickSearch'=>['city'], 'ipp'=>5, 'fieldsRead'=>['city']], // for Cities
'Themes'=>[
'_crud' => ['quickSearch'=>false, 'canDelete'=>true, 'canUpdate'=>true], // for Themes
'Hotels'=>[
'_crud' => ['quickSearch'=>false, 'canDelete'=>true, 'canUpdate'=>true], // for Hotels
]
],
]);
Please check if this works for you and if it does (or doesn't not) let us know by replying here.
thanks I will check it sorry I miss this message I do not know why I did it see it before :)
Is it possible to mantain the relation between tables that are in relation?
Cities -> has many themes, and each themes -> has many hotels
I will like CRUD shows not only that cities has many themes
but I want to be able to click on the theme name once it is created and when clicked takes me to the Hotels list...
I tried to create a relation like that with CRUD but I get this error:
Any way to do this ?
my code:
any ideas?
thanks