git commit "feat: improve admin panel and frontend features"
This commit is contained in:
@@ -0,0 +1,131 @@
|
||||
@extends('admin.layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="container-fluid pt-4">
|
||||
|
||||
<div class="card custom-card">
|
||||
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
|
||||
<div class="card-title">
|
||||
لیست ادمینها
|
||||
</div>
|
||||
|
||||
<a href="{{ route('admin.admins.create') }}"
|
||||
class="btn btn-primary">
|
||||
ایجاد ادمین
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table table-bordered table-hover text-center align-middle">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>نام</th>
|
||||
<th>نام خانوادگی</th>
|
||||
<th>نام کاربری</th>
|
||||
<th>موبایل</th>
|
||||
<th>وضعیت</th>
|
||||
<th>عملیات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@forelse($admins as $admin)
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
{{ $admin->first_name }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $admin->last_name }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $admin->username }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $admin->mobile }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@if($admin->status)
|
||||
<span class="badge bg-success">
|
||||
فعال
|
||||
</span>
|
||||
@else
|
||||
<span class="badge bg-danger">
|
||||
غیرفعال
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="d-flex justify-content-center gap-2">
|
||||
|
||||
<a href="{{ route('admin.admins.edit', $admin) }}"
|
||||
class="btn btn-warning btn-sm">
|
||||
ویرایش
|
||||
</a>
|
||||
|
||||
<form
|
||||
action="{{ route('admin.admins.destroy', $admin) }}"
|
||||
method="POST"
|
||||
class="d-inline"
|
||||
onsubmit="return confirm('آیا از حذف این ادمین مطمئن هستید؟')"
|
||||
>
|
||||
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-danger btn-sm"
|
||||
>
|
||||
حذف
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
@empty
|
||||
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
ادمینی ثبت نشده است.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforelse
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
{{ $admins->links() }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user