@if(!empty($users)) @foreach($users as $key =>$user) {{-- --}} {{-- --}} @endforeach @else

No User Found

@endif
S.No Name Email Phone Address City Total Booking Action
{{ $key +1}} {{ $user->name ?? 'NA' }} {{ $user->email ?? 'NA' }} {{ $user->phone }} {{ optional($user->addresses->first())->address ?? 'N/A' }} {{ optional($user->addresses->first())->city ?? 'N/A' }} {{ $user->orders->where('item_type', 'rent')->count() }} {{ $user->created_at->format('d-M-Y') }} @if($user->is_active) @php $statusBtn = '' @endphp Active @else @php $statusBtn = '' @endphp Deactive @endif
{!! $statusBtn !!}
{!! $users->links() !!}