@php $preserve = request()->only(['vendor', 'view', 'from', 'to', 'txn', 'q', 'company_name', 'contact_name', 'email', 'phone', 'state', 'vendor_code', 'dir']); $currentDir = $sortDir ?? 'asc'; $currentSort = $sortBy ?? 'name'; $sortOptions = $sortOptions ?? config('vendor.sort_options'); @endphp
Sorted by
@foreach($sortOptions as $key => $label) @php $nextDir = ($currentSort === $key && $currentDir === 'asc') ? 'desc' : 'asc'; $isActive = $currentSort === $key; @endphp {{ $label }} @if($isActive) @endif @endforeach @if(!empty($showTableLink))
Table view @endif