fix: role anggota tidak bisa dihapus via form edit user

This commit is contained in:
2026-04-05 22:48:23 +07:00
parent 56bba3565b
commit b5ac4d892f
+5
View File
@@ -12,6 +12,11 @@ class UserObserver
{
public function updated(User $user): void
{
// Pastikan role anggota selalu ada
if (! $user->hasRole('anggota')) {
$user->assignRole('anggota');
}
// Log perubahan status anggota
if ($user->wasChanged('status')) {
MemberStatusLog::create([