diff --git a/app/Http/Controllers/Admin/SettingController.php b/app/Http/Controllers/Admin/SettingController.php
new file mode 100644
index 0000000..3b91f20
--- /dev/null
+++ b/app/Http/Controllers/Admin/SettingController.php
@@ -0,0 +1,61 @@
+applySearch()
+ ->paginate(10);
+
+ return view('admin.settings.index', compact('settings'));
+ }
+
+
+ public function create()
+ {
+ $settings = Setting::all();
+ return view('admin.settings.create',compact('settings'));
+
+ }
+
+ public function store(SettingStoreRequest $request)
+ {
+ Setting::create($request->validated());
+
+ return redirect()->route('admin.settings.index');
+ }
+
+ public function edit(Setting $setting)
+ {
+ return view('admin.settings.edit', compact('setting'));
+
+ }
+
+ public function update(SettingUpdateRequest $request,Setting $setting)
+ {
+
+ $setting->update($request->validated());
+
+ return redirect()
+ ->route('admin.settings.index')
+ ->with('success', 'تنظیمات با موفقیت ویرایش شد.');
+
+ }
+
+ public function destroy(Setting $setting)
+ {
+ $setting->delete();
+
+ return redirect()
+ ->route('admin.settings.index')
+ ->with('success', 'محصول با موفقیت حذف شد.');
+ }
+}
diff --git a/app/Http/Requests/Admin/SettingStoreRequest.php b/app/Http/Requests/Admin/SettingStoreRequest.php
new file mode 100644
index 0000000..67d5ed9
--- /dev/null
+++ b/app/Http/Requests/Admin/SettingStoreRequest.php
@@ -0,0 +1,37 @@
+|string>
+ */
+ public function rules(): array
+ {
+ return [
+ 'code'=>[
+ 'required',
+ 'string',
+ 'max:100'
+ ],
+ 'value'=>[
+ 'nullable',
+ 'string',
+ ]
+ ];
+ }
+}
diff --git a/app/Http/Requests/Admin/SettingUpdateRequest.php b/app/Http/Requests/Admin/SettingUpdateRequest.php
new file mode 100644
index 0000000..299a482
--- /dev/null
+++ b/app/Http/Requests/Admin/SettingUpdateRequest.php
@@ -0,0 +1,37 @@
+|string>
+ */
+ public function rules(): array
+ {
+ return [
+ 'code'=>[
+ 'required',
+ 'string',
+ 'max:100'
+ ],
+ 'value'=>[
+ 'nullable',
+ 'string',
+ ]
+ ];
+ }
+}
diff --git a/app/Models/Setting.php b/app/Models/Setting.php
index 7a5cb1f..9e0a5b7 100644
--- a/app/Models/Setting.php
+++ b/app/Models/Setting.php
@@ -7,11 +7,13 @@
namespace App\Models;
use Carbon\Carbon;
+use Illuminate\Database\Eloquent\Attributes\Scope;
+use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
/**
* Class Setting
- *
+ *
* @property int $id
* @property string $code
* @property string $value
@@ -29,4 +31,20 @@ class Setting extends Model
'code',
'value'
];
+
+ #[Scope]
+ protected function applySearch(Builder $query): void
+ {
+ $request = request();
+
+ if ($request->filled('keyword')) {
+ $keyword = $request->input('keyword');
+
+
+ $query->whereAny([
+ 'code',
+ ], 'LIKE', "%$keyword%");
+ }
+ }
+
}
diff --git a/app/helpers/helpers.php b/app/helpers/helpers.php
index 61e3108..8c75552 100644
--- a/app/helpers/helpers.php
+++ b/app/helpers/helpers.php
@@ -1,5 +1,7 @@
where('code', $code)
+ ->first();
+
+ if (!$setting) {
+ return null;
+ }
+
+ return $setting->value;
+ }
+}
diff --git a/public/assets/css/footer.css b/public/assets/css/footer.css
new file mode 100644
index 0000000..6f36245
--- /dev/null
+++ b/public/assets/css/footer.css
@@ -0,0 +1,168 @@
+.travel-footer {
+
+ margin-top:80px;
+
+ padding:70px 0 25px;
+
+ background:
+ linear-gradient(
+ 135deg,
+ #06192f,
+ #0d5570
+ );
+
+ color:white;
+
+}
+
+
+
+.footer-logo {
+
+ font-size:32px;
+
+ font-weight:900;
+
+ color:#ffc107;
+
+ margin-bottom:20px;
+
+}
+
+
+
+.travel-footer p {
+
+ color:rgba(255,255,255,.75);
+
+ line-height:2;
+
+}
+
+
+
+.travel-footer h5 {
+
+ font-size:20px;
+
+ font-weight:800;
+
+ margin-bottom:25px;
+
+}
+
+
+
+.travel-footer ul {
+
+ list-style:none;
+
+ padding:0;
+
+}
+
+
+
+.travel-footer li {
+
+ margin-bottom:15px;
+
+ color:rgba(255,255,255,.75);
+
+}
+
+
+
+.travel-footer a {
+
+ color:rgba(255,255,255,.75);
+
+ text-decoration:none;
+
+ transition:.3s;
+
+}
+
+
+
+.travel-footer a:hover {
+
+ color:#ffc107;
+
+ padding-right:8px;
+
+}
+
+
+
+.footer-social {
+
+ display:flex;
+
+ gap:10px;
+
+ margin-top:25px;
+
+}
+
+
+
+.footer-social a {
+
+ border:1px solid rgba(255,255,255,.2);
+
+ padding:8px 15px;
+
+ border-radius:20px;
+
+}
+
+
+
+.footer-social a:hover {
+
+ background:#ffc107;
+
+ color:#06192f;
+
+}
+
+
+
+.footer-contact p {
+
+ margin-bottom:10px;
+
+}
+
+
+
+.footer-bottom {
+
+ display:flex;
+
+ justify-content:space-between;
+
+ align-items:center;
+
+ padding-top:20px;
+
+ color:rgba(255,255,255,.6);
+
+}
+
+
+
+@media(max-width:768px){
+
+ .footer-bottom{
+
+ flex-direction:column;
+
+ gap:10px;
+
+ text-align:center;
+
+ }
+
+}
diff --git a/resources/views/admin/admins/create.blade.php b/resources/views/admin/admins/create.blade.php
deleted file mode 100644
index 97b6146..0000000
--- a/resources/views/admin/admins/create.blade.php
+++ /dev/null
@@ -1,132 +0,0 @@
-@extends('admin.layouts.app')
-
-@section('content')
-
-
-
-
-
-
-
-
- افزودن مدیر جدید
-
-
-
-
-
-
-
-
-
-
-
-@endsection
diff --git a/resources/views/admin/admins/edit.blade.php b/resources/views/admin/admins/edit.blade.php
deleted file mode 100644
index 8e8c317..0000000
--- a/resources/views/admin/admins/edit.blade.php
+++ /dev/null
@@ -1,162 +0,0 @@
-@extends('admin.layouts.app')
-
-@section('content')
-
-
-
-
-
-
-
-
- ویرایش مدیر
-
-
-
-
-
-
- @foreach($roles as $role)
-
-
-
- roles->contains($role->id)
- )
- >
-
-
-
-
-
- @endforeach
-
-
-
-
-
-
-
-
-
-
-
-@endsection
diff --git a/resources/views/admin/admins/index.blade.php b/resources/views/admin/admins/index.blade.php
deleted file mode 100644
index f64017e..0000000
--- a/resources/views/admin/admins/index.blade.php
+++ /dev/null
@@ -1,209 +0,0 @@
-@extends('admin.layouts.app')
-
-@section('breadcrumb')
-
- مدیریت مدیران
-
-@endsection
-
-
-@section('content')
-
-
-
-
-
-
- لیست مدیران
-
-
-
- افزودن مدیر جدید
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | شناسه |
- نام |
- نام خانوادگی |
- نام کاربری |
- ایمیل |
- وضعیت |
- عملیات |
-
-
-
-
-
-
-
- @forelse($admins as $admin)
-
-
-
- | {{ $admin->id }} |
-
- {{ $admin->first_name }} |
-
- {{ $admin->last_name }} |
-
- {{ $admin->username }} |
-
- {{ $admin->email }} |
-
-
-
-
- @if($admin->status)
-
-
- فعال
-
-
- @else
-
-
- غیرفعال
-
-
- @endif
-
- |
-
-
-
-
-
- ویرایش
-
-
-
-
-
- |
-
-
-
-
- @empty
-
-
- |
- رکوردی پیدا نشد
- |
-
-
- @endforelse
-
-
-
-
-
-
-
-
- {{ $admins->links() }}
-
-
-
-
-
-
-
-@endsection
diff --git a/resources/views/admin/layouts/sidebar.blade.php b/resources/views/admin/layouts/sidebar.blade.php
index a2562cf..44be220 100644
--- a/resources/views/admin/layouts/sidebar.blade.php
+++ b/resources/views/admin/layouts/sidebar.blade.php
@@ -96,6 +96,14 @@
مدیریت شهرستان ها
+
+
+
+
+تنظیمات
+
+
diff --git a/resources/views/admin/settings/cities.blade.php b/resources/views/admin/settings/cities.blade.php
deleted file mode 100644
index ffc641a..0000000
--- a/resources/views/admin/settings/cities.blade.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/resources/views/admin/settings/create.blade.php b/resources/views/admin/settings/create.blade.php
new file mode 100644
index 0000000..edc1904
--- /dev/null
+++ b/resources/views/admin/settings/create.blade.php
@@ -0,0 +1,136 @@
+@extends('admin.layouts.app')
+
+@section('breadcrumb')
+
+
+@endsection
+
+@section('content')
+
+
+
+@endsection
diff --git a/resources/views/admin/settings/edit.blade.php b/resources/views/admin/settings/edit.blade.php
new file mode 100644
index 0000000..832d922
--- /dev/null
+++ b/resources/views/admin/settings/edit.blade.php
@@ -0,0 +1,144 @@
+@extends('admin.layouts.app')
+
+@section('breadcrumb')
+
+
+
+@endsection
+
+@section('content')
+
+
+
+@endsection
diff --git a/resources/views/admin/settings/index.blade.php b/resources/views/admin/settings/index.blade.php
new file mode 100644
index 0000000..d0745bb
--- /dev/null
+++ b/resources/views/admin/settings/index.blade.php
@@ -0,0 +1,200 @@
+@extends('admin.layouts.app')
+@section('breadcrumb')
+
+
+
+@endsection
+
+@section('content')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+ کلید تنظیم
+ |
+
+
+
+ مقدار
+ |
+
+
+
+ تاریخ ثبت
+ |
+
+
+
+ عملیات
+ |
+
+
+
+
+
+
+
+
+
+ @forelse($settings as $setting)
+
+
+
+
+ |
+
+ {{ $setting->code }}
+
+ |
+
+
+
+ {{ $setting->value }}
+
+ |
+
+
+
+ {{ $setting->created_at->toJalali()->format('Y/m/d') }}
+
+ |
+
+
+
+
+
+ ویرایش
+
+
+
+
+
+
+ |
+
+
+ @empty
+
+
+
+ |
+
+ تنظیماتی ثبت نشده است.
+
+ |
+
+
+
+ @endforelse
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $settings->links() }}
+
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index fc68125..5e1822c 100644
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -12,6 +12,7 @@
+
diff --git a/resources/views/layouts/footer.blade.php b/resources/views/layouts/footer.blade.php
index 091ef5c..4879916 100644
--- a/resources/views/layouts/footer.blade.php
+++ b/resources/views/layouts/footer.blade.php
@@ -1,150 +1,138 @@
-
-
+