@extends('layout.main') @section('content')

Manajemen User

Kelola data pengguna sistem

@if(session('success'))
{{ session('success') }}
@endif
@foreach($users as $u) @endforeach
Nama Username Role Aksi
{{ substr($u->nama, 0, 1) }}
{{ $u->nama }}
@if($u->nomor_hp)
{{ $u->nomor_hp }}
@endif
@{{ $u->username }} @php $roleColors = [ 'admin' => 'bg-purple-100 text-purple-800', 'user' => 'bg-green-100 text-green-800', 'editor' => 'bg-blue-100 text-blue-800', ]; $color = $roleColors[$u->role] ?? 'bg-gray-100 text-gray-800'; @endphp {{ ucfirst($u->role) }}
|
@csrf @method('DELETE')
@if($users->isEmpty())

Belum ada user

Mulai dengan menambahkan user baru

@endif
@include('user.modal-add') @include('user.modal-edit') @endsection