//Single $user->roles()->sync([1,2,3]); //With attributes $user->roles()->sync([ 1 => ['expires' => true], 2 => ['expires' => false], ... ]);