tambah namaste

This commit is contained in:
pesu98
2026-05-11 12:29:41 +08:00
parent 66d384b04d
commit c7fded1d8f
6 changed files with 68 additions and 3 deletions

View File

@@ -25,6 +25,25 @@
<x-input-error class="mt-2" :messages="$errors->get('email')" />
</div>
<div>
<x-input-label :value="__('Roles')" />
<div class="mt-2 space-y-2">
@foreach ($roles as $role)
<label class="flex items-center gap-2">
<input
type="checkbox"
name="roles[]"
value="{{ $role->id }}"
class="rounded border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800"
{{ in_array($role->id, old('roles', $user->roles->pluck('id')->toArray())) ? 'checked' : '' }}
/>
<span class="text-sm text-gray-700 dark:text-gray-300">{{ $role->name }}</span>
</label>
@endforeach
</div>
<x-input-error class="mt-2" :messages="$errors->get('roles')" />
</div>
<div class="flex items-center gap-4">
<x-primary-button>{{ __('Save Changes') }}</x-primary-button>
<a href="{{ route('users.index') }}" class="text-sm text-gray-600 dark:text-gray-400 hover:underline">