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

User Management

@if (session()->has('success')) @endif @if (session()->has('error')) @endif
Daftar Admin & Staff
Tambah User
@forelse($users as $index => $user) @empty @endforelse
No Foto Nama Username Email Phone Role Status Bergabung Aksi
{{ $index + 1 }} @if($user->profile) Photo @else
@endif
{{ $user->name }} {{ $user->username }} {{ $user->email }} {{ $user->phone }} @if($user->role === 'admin') Admin @elseif($user->role === 'staff') Staff @else {{ ucfirst($user->role) }} @endif {{ $user->status_label }} {{ $user->created_at->format('d M Y') }}
@if($user->id !== auth()->id())
@csrf @method('DELETE')
@endif

Belum ada user yang terdaftar

Statistik User

{{ $users->where('role', 'admin')->count() }}

Total Admin

{{ $users->where('role', 'staff')->count() }}

Total Staff
Status Akun

{{ $users->where('status', 'active')->count() }}

Akun Aktif

{{ $users->where('status', 'inactive')->count() }}

Akun Nonaktif
@endsection