@php $inp = 'mt-1 block w-full rounded-md border-gray-300 text-sm'; $lbl = 'block text-sm font-medium text-gray-700'; @endphp

Clients

@if (session('status'))
{{ session('status') }}
@endif
Reset
@php $th = function ($col, $label) use ($sort, $dir) { $next = ($sort === $col && $dir === 'asc') ? 'desc' : 'asc'; $arrow = $sort === $col ? ($dir === 'asc' ? ' ↑' : ' ↓') : ''; $url = request()->fullUrlWithQuery(['sort' => $col, 'dir' => $next, 'page' => null]); return new \Illuminate\Support\HtmlString(''.e($label).$arrow.''); }; @endphp
@forelse ($clients as $c) @empty @endforelse
{{ $th('name', 'Client') }} Contact person Phone Email {{ $th('orders_count', 'Orders') }}
{{ $c->name }} {{ $c->contact_person ?: '—' }} {{ $c->phone ?: '—' }} {{ $c->email ?: '—' }} {{ $c->orders_count }}
No clients found.
{{ $clients->links() }}
{{-- New client popup --}}
@csrf

New client