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

Dashboard

Users
@if (Session::has('error_message')) @endif @if (Session::has('success_message')) @endif @if ($errors->any())
@endif
{{--
--}} {{-- --}} @if (!empty($user)) @foreach ($user as $key => $item) {{-- --}} @endforeach @endif
SR No. Full Name Email Phone Address School Gender User Role Status Designation Created_at Action
{{-- {{ $item->id }} --}} {{ $key + 1 }} {{ $item->fullname }} {{ $item->email }} {{$item->phone}} {{ $item->address }} {{-- @foreach ($School as $sh) @if ($item->school_id == $sh->id) {{ $sh->school_name }} @else @endif @endforeach --}} @php // Decode JSON if school_id is a JSON string $schoolIds = is_string($item->school_id) ? json_decode($item->school_id, true) : $item->school_id; // Ensure $schoolIds is an array $schoolIds = is_array($schoolIds) ? $schoolIds : [$schoolIds]; // Collect school names $schoolNames = []; foreach ($School as $sh) { if (in_array($sh->id, $schoolIds)) { $schoolNames[] = $sh->school_name; } } @endphp {{ implode(' | ', $schoolNames) }} {{ $item->gender }} @if ($item->role == '1') Admin @else Doctor @endif {{-- {{$item->role}} --}} @if ($item->status == '1') Active @else Deactive @endif {{-- @if ($item->designation == 0) Admin @else --}} @if ($item->designation == 1) Doctor @elseif ($item->designation == 2) Nutritionist @elseif ($item->designation == 3) Psychologist @elseif ($item->designation == 4) Founder and Director @elseif ($item->designation == 5) Co Founder And chief Ooperating Officer @elseif ($item->designation == 6) Chief Advisor And Business Support Manager @elseif ($item->designation == 7) Clinical Operations Lead @elseif ($item->designation == 8) Adminstrive Coordinator @elseif ($item->designation == 9) Clinical Psychologist @elseif ($item->designation == 10) Clinical Nutritionist @elseif ($item->designation == 11) School Health Physican (KIRAN FOUNDATION) @elseif ($item->designation == 12) School Health Physican (SAVE THE FUTURE) @elseif ($item->designation == 13) School Health Physican (THE SET SCHOOL) @elseif ($item->designation == 14) School Health Physican (LOCUM) @else N/A @endif {{ $item->created_at }} {{-- --}} @if ($item->status == '1') @else @endif
{{-- --}}
@endsection {{-- --}} @section('script') @endsection