We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
atk4\ui\Exception: Unable to set property for the object
Any way to do this ?
my code:
$crud = $app->add([ '\atk4\mastercrud\MasterCRUD', 'quickSearch'=>['city'], 'ipp'=>5, 'fieldsRead'=>['city'] ]); $m = $crud->setModel(new Cities($app->db), [ 'Themes'=>[ 'CRUD', 'quickSearch'=>false, 'canDelete'=>true, 'canUpdate'=>true', 'Hotels'=>[ 'CRUD', 'quickSearch'=>false, 'canDelete'=>true, 'canUpdate'=>true' ] ], ]);
any ideas?
thanks
The text was updated successfully, but these errors were encountered:
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.
_crud
There is also key _tabs. That's how you can pass some properties to tabs view if needed.
_tabs
$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.
Sorry, something went wrong.
thanks I will check it sorry I miss this message I do not know why I did it see it before :)
DarkSide666
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: