@extends('layout') @push('styles') @endpush @section('content') @if (session('success'))
×

Success!

{{ session('success') }}

@endif

All Vendors

Overview

{{-- Tabs / Filters (All | Active | Inactive | Draft) --}}
@php // Build base query string excluding 'page' so tabs reset to page 1 $baseQuery = request()->except(['page', 'status']); $status = request('status', 'all'); @endphp
{{-- Filters Row (search, sort, date) --}}
{{-- Keep status when changing other filters --}} {{-- Search --}} {{-- Sort --}} {{-- Direction --}} {{-- Date --}} {{-- Buttons (INLINE on Desktop, WRAP on Mobile) --}}
Reset
{{-- Table --}}
@forelse($vendors as $vendor) @empty @endforelse
Vendor Name Contact Info Website Created Date Status Location
icon

{{ $vendor->name }} ID-{{ $vendor->id }}

@if ($vendor->website) {{ $vendor->website }} @else @endif {{ optional($vendor->created_at)->format('M d, Y') }} @php $statusClass = match ($vendor->status) { 'active' => 'active_status', 'inactive' => 'inactive', 'draft' => 'draft', default => 'draft', }; @endphp {{ ucfirst($vendor->status) }} {{ $vendor->location ?? 'N/A' }}
{{-- Action Trigger --}} {{-- Dropdown Menu --}}
icon Edit
@csrf @method('DELETE')

Are you sure?

This action cannot be undone.

No vendors found.
{{-- Items per page dropdown --}}
@foreach (request()->except('per_page') as $key => $value) @endforeach
{{-- Pagination Display --}}

Page {{ $vendors->currentPage() }} of {{ $vendors->lastPage() }}

{{-- Previous --}} @if ($vendors->onFirstPage()) @else icon @endif {{-- Next --}} @if ($vendors->currentPage() == $vendors->lastPage()) @else icon @endif
{{-- Optional small script: press Enter in search to submit --}} @endsection