@extends('admin.layouts.app') @section('page-title', 'Shipment Management') @section('content')
{{-- SUCCESS / ERROR MESSAGES --}} @if(session('success')) @endif @if(session('error')) @endif
Shipments List
@php $totalShipments = count($shipments); @endphp @forelse($shipments as $ship) {{-- REVERSE INDEX --}} @empty @endforelse
# Shipment ID Origin Destination Total QTY Total KG Total CBM Total Amount Status Date Actions View
{{ $totalShipments - $loop->index }} {{ $ship->shipment_id }} {{ $ship->origin }} {{ $ship->destination }} {{ $ship->total_qty }} {{ $ship->total_kg }} kg {{ $ship->total_cbm }} CBM ₹{{ number_format($ship->total_amount, 2) }} @if($ship->status == 'pending') @elseif($ship->status == 'in_transit') @elseif($ship->status == 'dispatched') @elseif($ship->status == 'delivered') @endif {{ ucfirst(str_replace('_', ' ', $ship->status)) }} {{ \Carbon\Carbon::parse($ship->shipment_date)->format('d M Y') }}
@csrf
No shipments found
Showing 1 to {{ $shipments->count() }} of {{ $shipments->count() }} entries
@endsection