Skip to content

Browser field outside block not saving to DB #1539

Answered by ruudbwai
ruudbwai asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry, it was me being pepega as usual (naming things terribly).

I just followed the updateBrowser method in my MenuRepository and found it accepts a few more arguments

public 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…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ruudbwai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant