{{-- Status tabs with counts, search, extra filters, sort and page size for a client list (App\Support\ClientListFilter). Every control is a plain GET form, so a filtered list can be bookmarked or shared. action the list's URL tabs optional ['param' => 'status', 'counts' => [value => n], 'current' => ?string, 'label' => ?callable] search optional ['value' => string, 'placeholder' => string] selects optional list of ['name', 'label', 'options' => [value => label], 'value'] sorts optional [key => label], with sort the current key paginator optional LengthAwarePaginator for "Showing x-y of z" filtered whether a filter is applied (shows Reset) --}} @php $tabs = $tabs ?? null; $selects = $selects ?? []; $sorts = $sorts ?? []; $tabParam = $tabs['param'] ?? 'status'; $tabLabel = $tabs['label'] ?? fn ($v) => invoice_status_label($v); $keep = request()->except(['page', $tabParam]); $showTabs = $tabs && (count($tabs['counts']) > 1 || filled($tabs['current'])); @endphp
@once @endonce