Laravel Syncwithoutdetaching
$user->roles()->syncWithoutDetaching([1, 2, 3]);
Johs
$user->roles()->syncWithoutDetaching([1, 2, 3]);
//id for single
$user->reasons->attach($reasonId);
//array for multiple
$user->reasons->attach($reasonIds);
$user->save();
$user->roles()->attach($roleId, ['expires' => $expires]);