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