Modify query on AttachAction
Hello,
I have this code, allowing to attach more products with BelongsToMany Relation:
It works, but I want to modify the query when saving, to add the inverse record in the DB, how do your do that ?
Tried
Is there any way to do this, event if its not trough filament?
Thanks!
I have this code, allowing to attach more products with BelongsToMany Relation:
It works, but I want to modify the query when saving, to add the inverse record in the DB, how do your do that ?
Tried
$action->getRecordSelect()->saveRelationshipsUsing, but since it doesnt have ->relationship chained it doesnt work.Is there any way to do this, event if its not trough filament?
Thanks!