Files
Kent-logistics-Laravel/routes/container.blade.php
2026-02-17 14:32:48 +05:30

55 lines
2.2 KiB
PHP

@extends('admin.layouts.app')
@section('page-title', 'Containers')
@section('content')
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="mb-0">Container List</h5>
<a href="{{ route('containers.create') }}" class="btn btn-primary btn-sm">
Add Container
</a>
</div>
<div class="card-body">
@if(session('success'))
<div class="alert alert-success">{{ session('success') }}</div>
@endif
@if($containers->isEmpty())
<p class="mb-0">No containers found.</p>
@else
<table class="table table-bordered table-striped align-middle">
<thead class="table-light">
<tr>
<th>#</th>
<th>Customer Name</th>
<th>Container Number</th>
<th>Date</th>
<th>Excel File</th>
</tr>
</thead>
<tbody>
@foreach($containers as $container)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $container->customer_name }}</td>
<td>{{ $container->container_number }}</td>
<td>{{ $container->container_date?->format('d-m-Y') }}</td>
<td>
@if($container->excel_file)
<a href="{{ Storage::url($container->excel_file) }}" target="_blank">
Download
</a>
@else
-
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
@endif
</div>
</div>
@endsection