-
Hi there, I'm really enjoying twill. Really close to getting it to behave as I'd like, but have an issue. Another silly question, and feels like it's something simple I'm missing, so asking as a question. Feels like it's related to this - #45 , but I can't get my browser to save anything from outside blocks. I'm trying to attach menu items to menus. Using a browser for the menu items. I have created the pivot table, the relationship, and added the My menu
My
My pivot table
My
I can browse menu items, and select and can hit update. I can actually see the payload from my network is as expected, but nothing is saved to my The response Question is, do I need to manually insert the record into the pivot table? The docs suggest this should happen automatically because of the Or am I missing something really basic yet again? Versions |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Sorry, it was me being pepega as usual (naming things terribly). I just followed the
So I gave it what it wanted according to my pepega naming
And it now behaves, and records are saved as expected...In future I'll dig a little deeper before boring you all with silly questions. :D p.s. hopefully it goes without saying, I also had to update the
|
Beta Was this translation helpful? Give feedback.
Sorry, it was me being pepega as usual (naming things terribly).
I just followed the
updateBrowser
method in myMenuRepository
and found it accepts a few more argumentspublic function updateBrowser($object, $fields, $relationship, $positionAttribute = 'position', $browserName = null, $pivotAttributes = [])
So I gave it what it wanted according to my pepega naming
$this->updateBrowser($object, $fields, 'menu_items', 'position', 'menuItems');
And it now behaves, and records are saved as expected...In future I'll dig a little deeper before boring you all with silly questions. :D
p.s. hopefully it goes without saying, I also had to update the
getFormFields
method to correctly key in my menu…