@extends('layouts.admin.master') @section('head') @endsection @section('title') Bargain Book Hut — Referral Register @endsection @section('body')
{{-- ── Header ── --}}

Referral Register @isset($countdata) @if($countdata > 0) ({{ number_format($countdata) }} records) @endif @endisset

{{-- FIX: GET form — no @csrf needed. Action points to THIS page, not reforders. --}}
{{-- Clear button appears only when a search is active --}} @if(request('q')) ✕ Clear @endif
{{-- ── Errors ── --}} @include('UI.error') {{-- ── Table Card ── --}}

Users List

@isset($countdata) {{ $countdata > 0 ? number_format($countdata).' records found' : 'No records found' }} @else No records found @endisset
{{-- FIX: use ->isNotEmpty() which works for both Collections and Paginators --}} @if(isset($datauser) && $datauser->isNotEmpty())
@foreach($datauser as $data) @endforeach
Name Email Contact RFID Reg Date
{{ $data->name ?? 'N/A' }} {{ $data->email ?? 'N/A' }} {{ $data->contact_no ?? 'N/A' }} {{ $data->rfid ?? 'N/A' }} {{ $data->created_at ? \Carbon\Carbon::parse($data->created_at)->format('d-m-Y') : 'N/A' }}
{{-- FIX: appends() keeps ?q= in all pagination links --}}
{{ $datauser->appends(request()->query())->links() }}
@else
No Records Found

No referral users match your search criteria.

@endif
@endsection @section('script') @endsection