@extends('layouts.admin') @section('css') @endsection @section('admin')

Users

@csrf
@if (request('search')) @endif
{{-- --}} {{-- --}} @foreach ($users as $user) @php // Generate initials if profile image is missing $initials = ''; if (!empty($user->name)) { $words = explode(' ', trim($user->name)); $first = strtoupper(substr($words[0], 0, 1)); $last = count($words) > 1 ? strtoupper(substr(end($words), 0, 1)) : ''; $initials = $first . $last; } @endphp {{-- --}} {{-- --}} @endforeach
Profile Image Full Name Email User ID Phone NumberCountryTotal Coin Seller CoinJoined DateStatus Role Settings
@if (!empty($user->user_profile->profile_image) && file_exists($user->user_profile->profile_image)) Header Avatar @else
{{ $initials }}
@endif
{{ $user->name }} {{ $user->email }} {{ $user->user_id }} {{ $user->phone_number }}{{ $user->user_profile->country ?? '' }}{{ $user->total_coin ?? 0 }} {{ $user->seller_coin ?? 0 }}{{ \Carbon\Carbon::parse($user->created_at)->format('Y-m-d') }} @if ($user->account_status == 'active') Active @elseif ($user->account_status == 'blocked') Blocked @else @endif {{ $user->getRoleNames()->first() ?? 'N/A' }} @if ($user->account_status == 'active') @else @endif {{-- --}} @if (!empty($user->user_token)) @endif
Showing {{ $users->firstItem() }} to {{ $users->lastItem() }} of {{ $users->total() }} entries
@endsection @section('js') @endsection