Attach Relation Manager
Hello friends, I have a question, how is it that in the attach of a relation manager I attach the same record already registered?
3 Replies
This is on my list of 'learn how to do as well.
I have a M-M attachment with extra data on the pivot so it needs to allow for multiple connections. I have a feeling it would be something around injecting or convincing the ' $action->getRecordSelect()' to allow duplicates. There is probably a dead easy way to do it I haven't seen. That's next weeks investigation I hope π
I have a M-M attachment with extra data on the pivot so it needs to allow for multiple connections. I have a feeling it would be something around injecting or convincing the ' $action->getRecordSelect()' to allow duplicates. There is probably a dead easy way to do it I haven't seen. That's next weeks investigation I hope π
same problem here, boosting for awnser :))
I managed to get duplicates to work. The doco is incomplete.
1. On the relation manager add this to the top of the class:
protected bool $allowsDuplicates = true;
2. And then on the 'return $table' add this
->allowDuplicates()
Hope that helps π