@extends('layouts.app') @section('page_title', 'User Management') @section('page_subtitle', 'Create, edit, delete users and manage their roles') @section('page_actions') Create User @endsection @section('content') {{-- Filters --}}
Reset

All Users

{{ $users->total() }} users found

@forelse ($users as $user) @empty @endforelse
User Email Phone Role Last Login Created
{{-- Avatar --}} @if ($user->profile_image) {{ $user->name }} @else
{{ strtoupper(substr($user->name, 0, 1)) }}
@endif
{{ $user->name }} @if ($user->id === auth()->id()) You @endif
{{ $user->email }} {{ $user->phone ?? '—' }} @php $roleCls = match($user->role) { 'admin' => 'badge-info', 'manager' => 'badge-warning', default => '' }; @endphp {{ ucfirst($user->role) }} {{ $user->last_login_at ? $user->last_login_at->diffForHumans() : '—' }} {{ $user->created_at->format('d M Y') }}
Edit @if ($user->id !== auth()->id())
@csrf @method('DELETE')
@endif
No users found.
{{ $users->links() }}
@endsection