@auth @role('superadministrator')

Users Accounts

Total Users: @if((array)json_decode($userData, true)) {{ count((array)json_decode($userData, true)) }} @else {{ __(0) }} @endif

@if((array)json_decode($userData, true)) @foreach ((array)json_decode($userData, true) as $key => $Dataitems ) @endforeach @endif
# First Name Middle Name Last Name Email Phone Role
{{ $key+1 }} {{ $Dataitems['fname'] }} {{ $Dataitems['mname'] }} {{ $Dataitems['lname'] }} {{ $Dataitems['email'] }} {{ '0'.$Dataitems['phone'] }} {{ $Dataitems['roleUser'] }}
@endrole @role('administrator')

Staffs Accounts

@php $authUser = Auth::user()->uuids; $clinicCode = \App\Models\ClinicStaff::where(['user_id' => $authUser]) ->select('clinic_id')->first()->toArray(); $clinicName = \App\Models\Clinic::where(['clinic_id' => $clinicCode['clinic_id']]) ->first()->toArray(); @endphp

STAFF'S LIST : {{ $clinicName['c_name'] }}

@if((array)json_decode($userData, true)) @foreach ((array)json_decode($userData, true) as $key => $Dataitems ) @if($clinicCode['clinic_id'] === $Dataitems['clinic_id'] ) @if($authUser == $Dataitems['user_id']) @else @endif @endif @endforeach @endif
# First Name Middle Name Last Name Email Phone Role
{{ $key+1 }} {{ $Dataitems['fname'] }} {{ $Dataitems['mname'] }} {{ $Dataitems['lname'] }} {{ $Dataitems['email'] }} {{ '0'.$Dataitems['phone'] }} {{ $Dataitems['roleUser'] }}{{ $key+1 }} {{ $Dataitems['fname'] }} {{ $Dataitems['mname'] }} {{ $Dataitems['lname'] }} {{ $Dataitems['email'] }} {{ '0'.$Dataitems['phone'] }} {{ $Dataitems['roleUser'] }}
@endrole @endauth