@extends('layouts.app') @section('title', 'إدارة المستخدمين') @section('page_title', 'إدارة المستخدمين') @section('content')

{{ \App\Models\User::where('role', 'patient')->count() }}

المرضى

{{ \App\Models\User::where('role', 'doctor')->count() }}

الأطباء

{{ \App\Models\User::where('role', 'receptionist')->count() }}

موظفي الاستقبال

{{ \App\Models\User::count() }}

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

قائمة المستخدمين
@foreach(\App\Models\User::paginate(15) as $user) @endforeach
الاسم رقم المريض رقم الهاتف البريد الإلكتروني النوع تاريخ التسجيل الإجراءات
{{ $user->name }} {{ $user->patient_number ?? '-' }} {{ $user->mobile }} {{ $user->email ?? '-' }} @switch($user->role) @case('admin') مدير @break @case('doctor') طبيب @break @case('receptionist') موظف استقبال @break @case('patient') مريض @break @endswitch {{ $user->created_at->format('Y-m-d') }}
إحصائيات سريعة
المستخدمين الجدد هذا الأسبوع

{{ \App\Models\User::where('created_at', '>=', now()->subWeek())->count() }}

المستخدمين النشطين اليوم

{{ \App\Models\User::whereDate('updated_at', today())->count() }}

إجمالي المواعيد

{{ \App\Models\Appointment::count() }}

آخر المستخدمين المسجلين
@foreach(\App\Models\User::latest()->take(5)->get() as $user)
{{ $user->name }}
{{ $user->created_at->diffForHumans() }}
@endforeach
@endsection