fix: update airport management
This commit is contained in:
@@ -1,3 +1,76 @@
|
||||
<div>
|
||||
<!-- We must ship. - Taylor Otwell -->
|
||||
</div>
|
||||
@extends('admin.layouts.app')
|
||||
|
||||
@section('title', 'مدیریت فرودگاهها')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid py-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<div>
|
||||
<h4 class="mb-0">مدیریت فرودگاهها</h4>
|
||||
<span class="text-muted small">تعداد کل: {{ $airports->total() }} فرودگاه</span>
|
||||
</div>
|
||||
<a href="{{ route('admin.airports.create') }}" class="btn btn-primary">
|
||||
<i class="bi bi-plus-lg"></i> افزودن فرودگاه
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@if (session('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
{{ session('success') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="بستن"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>نام فرودگاه</th>
|
||||
<th>کد</th>
|
||||
<th>استان</th>
|
||||
<th>شهر</th>
|
||||
<th class="text-center">عملیات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse ($airports as $airport)
|
||||
<tr>
|
||||
<td>{{ $airport->id }}</td>
|
||||
<td class="fw-semibold">{{ $airport->name }}</td>
|
||||
<td>{{ $airport->code }}</td>
|
||||
<td>{{ $airport->province }}</td>
|
||||
<td>{{ $airport->city }}</td>
|
||||
<td class="text-center">
|
||||
<div class="d-inline-flex gap-2">
|
||||
<a href="{{ route('admin.airports.edit', $airport) }}"
|
||||
class="btn btn-sm btn-outline-primary">ویرایش</a>
|
||||
|
||||
<form action="{{ route('admin.airports.destroy', $airport) }}"
|
||||
method="POST"
|
||||
onsubmit="return confirm('آیا از حذف فرودگاه {{ $airport->name }} مطمئن هستید؟')">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger">حذف</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="text-center text-muted py-5">
|
||||
هنوز فرودگاهی ثبت نشده است.
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
{{ $airports->links() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user