// All current roles will be removed from the user and replaced by the array given $user->syncRoles(['writer', 'admin']);