Say I have a Many to Many Relationship between
Roles and I wanted to move any Roles from User 1 to User 2 how would I do this?
Something like this?
What about if I also had additional data in the pivot? For example
$user1->roles()->->attach($roleId, ['expires' => $expires]);
How would you take the old pivot value and attach that over to the new user, carrying the roles and the pivot values from user1 to user 2?
Thanks for any advice.