132 lines
3.0 KiB
PHP
132 lines
3.0 KiB
PHP
@extends('admin.layouts.app')
|
|
|
|
|
|
@section('content')
|
|
|
|
|
|
<div class="container-fluid mt-4">
|
|
|
|
<div class="d-flex justify-content-between mb-4">
|
|
|
|
|
|
<h3 class="fw-bold">
|
|
مدیریت شهرستانها
|
|
</h3>
|
|
<a href="{{ route('admin.cities.create') }}"
|
|
class="btn btn-primary">
|
|
|
|
افزودن شهرستان
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="card shadow-sm border-0">
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
|
<table class="table table-hover text-center">
|
|
|
|
|
|
<thead class="table-light">
|
|
|
|
|
|
<tr>
|
|
<th>شناسه</th>
|
|
|
|
<th>
|
|
نام شهرستان
|
|
</th>
|
|
|
|
<th>
|
|
استان
|
|
</th>
|
|
<th>
|
|
تاریخ ثبت
|
|
</th>
|
|
|
|
<th>
|
|
عملیات
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@forelse($cities as $city)
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
{{ $city->id }}
|
|
</td>
|
|
|
|
|
|
<td class="fw-bold">
|
|
|
|
{{ $city->name }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ $city->province->name ?? '-' }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ $city->created_at?->toJalali()->format('Y/m/d') ?? '-' }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a href="{{ route('admin.cities.edit',$city->id) }}"
|
|
class="btn btn-warning btn-sm">
|
|
|
|
ویرایش
|
|
|
|
</a>
|
|
|
|
<form action="{{ route('admin.cities.destroy',$city->id) }}"
|
|
method="POST"
|
|
class="d-inline">
|
|
|
|
@csrf
|
|
|
|
@method('DELETE')
|
|
<button class="btn btn-danger btn-sm">
|
|
|
|
حذف
|
|
|
|
</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
|
|
<td colspan="5">
|
|
|
|
شهرستانی ثبت نشده است
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
@endforelse
|
|
|
|
</tbody>
|
|
</table>
|
|
{{ $cities->links() }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|