@extends('admin.layout') @section('title', 'إدارة المستخدمين') @section('page-title', 'إدارة المستخدمين') @section('content')
@php // Sample statistics - replace with actual data $stats = [ ['icon' => 'fas fa-users', 'value' => '245', 'label' => 'إجمالي المستخدمين', 'color' => '#FFD700'], ['icon' => 'fas fa-user-tie', 'value' => '12', 'label' => 'المديرين', 'color' => '#dc3545'], ['icon' => 'fas fa-user-friends', 'value' => '198', 'label' => 'العملاء', 'color' => '#28a745'], ['icon' => 'fas fa-user-check', 'value' => '35', 'label' => 'نشطين اليوم', 'color' => '#007bff'], ]; @endphp @foreach($stats as $stat)
{{ $stat['value'] }}
{{ $stat['label'] }}
@endforeach

فلترة النتائج

@forelse($users as $user) @empty @endforelse
# الاسم البريد الإلكتروني الهاتف الدور تاريخ التسجيل آخر دخول الحالة الإجراءات
{{ $user->id }}
{{ substr($user->first_name, 0, 1) }}
{{ $user->first_name }} {{ $user->last_name }} @if($user->email_verified_at) @else @endif
{{ $user->email }} {{ $user->phone ?? '-' }} @php $roleColors = [ 'admin' => ['bg' => 'rgba(220, 53, 69, 0.2)', 'color' => '#dc3545', 'text' => 'مدير'], 'staff' => ['bg' => 'rgba(255, 193, 7, 0.2)', 'color' => '#ffc107', 'text' => 'موظف'], 'customer' => ['bg' => 'rgba(0, 123, 255, 0.2)', 'color' => '#007bff', 'text' => 'عميل'] ]; $role = $roleColors[$user->role] ?? $roleColors['customer']; @endphp @switch($user->role) @case('admin') مدير @break @case('staff') موظف @break @case('customer') عميل @break @default {{ $user->role }} @endswitch {{ $user->created_at->format('Y-m-d') }} {{ $user->last_login_at ? $user->last_login_at->format('Y-m-d H:i') : 'لم يدخل بعد' }} {{ $user->is_active ? 'نشط' : 'غير نشط' }}
@if(isset($user->id) && auth()->id() !== $user->id) @endif

لا يوجد مستخدمين

لم يتم إضافة أي مستخدمين بعد

@if(isset($users) && method_exists($users, 'links'))
{{ $users->links() }}
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush