59 lines
2.7 KiB
PHP
59 lines
2.7 KiB
PHP
@extends('admin.layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container-fluid pt-4">
|
|
<div class="card custom-card">
|
|
<div class="card-header d-flex align-items-center justify-content-between">
|
|
<div class="card-title">مدیریت استانها</div>
|
|
<a href="{{ route('admin.provinces.create') }}" class="btn btn-primary btn-sm">
|
|
افزودن استان
|
|
</a>
|
|
</div>
|
|
|
|
<div class="card-body pt-0">
|
|
<div class="table-responsive">
|
|
<table class="table text-nowrap">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>نام استان</th>
|
|
<th>تعداد شهرستان</th>
|
|
<th>عملیات</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($provinces as $province)
|
|
<tr>
|
|
<td>{{ $province->id }}</td>
|
|
<td>{{ $province->name }}</td>
|
|
<td>{{ $province->cities_count }}</td>
|
|
<td>
|
|
<a href="{{ route('admin.provinces.edit', $province) }}" class="btn btn-sm btn-warning">
|
|
ویرایش
|
|
</a>
|
|
|
|
<form action="{{ route('admin.provinces.destroy', $province) }}" method="POST" class="d-inline">
|
|
@csrf
|
|
@method('delete')
|
|
<button type="submit" class="btn btn-sm btn-danger"
|
|
onclick="return confirm('آیا مطمئن هستید؟')">
|
|
حذف
|
|
</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="4" class="text-center">استانی ثبت نشده است</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
{{ $provinces->links() }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|