diff --git a/app/Http/Controllers/AdminAuthController.php b/app/Http/Controllers/AdminAuthController.php
new file mode 100644
index 0000000..604ccd9
--- /dev/null
+++ b/app/Http/Controllers/AdminAuthController.php
@@ -0,0 +1,44 @@
+validate([
+ 'email' => 'required|email',
+ 'password' => 'required|min:6',
+ ]);
+
+ $credentials = $request->only('email', 'password');
+
+ if (Auth::guard('admin')->attempt($credentials)) {
+ return redirect()->route('admin.dashboard')->with('success', 'Login successful!');
+ }
+
+ return back()->withErrors(['email' => 'Invalid credentials.'])->withInput();
+ }
+
+ // 🟢 Logout
+ public function logout(Request $request)
+ {
+ Auth::guard('admin')->logout();
+ $request->session()->invalidate();
+ $request->session()->regenerateToken();
+
+ return redirect()->route('admin.login')->with('success', 'Logged out successfully.');
+ }
+}
diff --git a/app/Models/Admin.php b/app/Models/Admin.php
new file mode 100644
index 0000000..a107900
--- /dev/null
+++ b/app/Models/Admin.php
@@ -0,0 +1,22 @@
+ 'jwt',
'provider' => 'users',
],
+
+ 'admin' => [
+ 'driver' => 'session',
+ 'provider' => 'admins',
+ ],
],
@@ -70,6 +75,11 @@ return [
'driver' => 'eloquent',
'model' => env('AUTH_MODEL', App\Models\User::class),
],
+
+ 'admins' => [
+ 'driver' => 'eloquent',
+ 'model' => App\Models\Admin::class,
+ ],
// 'users' => [
// 'driver' => 'database',
diff --git a/database/migrations/2025_11_06_051355_create_admins_table.php b/database/migrations/2025_11_06_051355_create_admins_table.php
new file mode 100644
index 0000000..da52084
--- /dev/null
+++ b/database/migrations/2025_11_06_051355_create_admins_table.php
@@ -0,0 +1,34 @@
+id();
+ $table->string('name');
+ $table->string('email')->unique();
+ $table->string('password');
+ $table->enum('role', ['super_admin', 'admin'])->default('admin');
+ $table->rememberToken();
+ $table->timestamps();
+ });
+ }
+
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::dropIfExists('admins');
+ }
+};
diff --git a/database/migrations/2025_11_06_094050_create_requests_table.php b/database/migrations/2025_11_06_094050_create_requests_table.php
new file mode 100644
index 0000000..08e0bf8
--- /dev/null
+++ b/database/migrations/2025_11_06_094050_create_requests_table.php
@@ -0,0 +1,39 @@
+id(); // Auto-increment primary key
+ $table->string('request_id')->unique(); // Custom formatted ID like REQ-2025-000001
+ $table->string('customer_name');
+ $table->string('company_name');
+ $table->string('designation');
+ $table->string('email')->unique();
+ $table->string('mobile_no');
+ $table->string('priority')->nullable();
+ $table->text('address')->nullable();
+ $table->string('pincode')->nullable();
+ $table->date('date')->nullable();
+ $table->enum('status', ['pending', 'approved', 'rejected'])->default('pending');
+ $table->timestamps();
+ });
+ }
+
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void
+ {
+ Schema::dropIfExists('requests');
+ }
+};
diff --git a/resources/views/admin/account.blade.php b/resources/views/admin/account.blade.php
new file mode 100644
index 0000000..8501c2d
--- /dev/null
+++ b/resources/views/admin/account.blade.php
@@ -0,0 +1,12 @@
+@extends('admin.layouts.app')
+
+@section('page-title', 'account')
+
+@section('content')
+
+
+
Welcome to the Admin account
+
Here you can manage all system modules.
+
+
+@endsection
diff --git a/resources/views/admin/chat_support.blade.php b/resources/views/admin/chat_support.blade.php
new file mode 100644
index 0000000..f4917d9
--- /dev/null
+++ b/resources/views/admin/chat_support.blade.php
@@ -0,0 +1,12 @@
+@extends('admin.layouts.app')
+
+@section('page-title', 'Dashboard')
+
+@section('content')
+
+
+
Welcome to the Admin chat
+
Here you can manage all system modules.
+
+
+@endsection
diff --git a/resources/views/admin/customers.blade.php b/resources/views/admin/customers.blade.php
new file mode 100644
index 0000000..127e252
--- /dev/null
+++ b/resources/views/admin/customers.blade.php
@@ -0,0 +1,12 @@
+@extends('admin.layouts.app')
+
+@section('page-title', 'Dashboard')
+
+@section('content')
+
+
+
Welcome to the Admin customer page
+
Here you can manage all system modules.
+
+
+@endsection
diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php
new file mode 100644
index 0000000..89f399d
--- /dev/null
+++ b/resources/views/admin/dashboard.blade.php
@@ -0,0 +1,12 @@
+@extends('admin.layouts.app')
+
+@section('page-title', 'Dashboard')
+
+@section('content')
+
+
+
Welcome to the Admin Dashboard
+
Here you can manage all system modules.
+
+
+@endsection
diff --git a/resources/views/admin/invoice.blade.php b/resources/views/admin/invoice.blade.php
new file mode 100644
index 0000000..c12ff5a
--- /dev/null
+++ b/resources/views/admin/invoice.blade.php
@@ -0,0 +1,12 @@
+@extends('admin.layouts.app')
+
+@section('page-title', 'Dashboard')
+
+@section('content')
+
+
+
Welcome to the Admin invoice
+
Here you can manage all system modules.
+
+
+@endsection
diff --git a/resources/views/admin/layouts/app.blade.php b/resources/views/admin/layouts/app.blade.php
new file mode 100644
index 0000000..63df38f
--- /dev/null
+++ b/resources/views/admin/layouts/app.blade.php
@@ -0,0 +1,130 @@
+
+
+
+
+ Admin Panel
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @yield('page-title')
+
+
+
+
+ @yield('content')
+
+
+
+
+
+
diff --git a/resources/views/admin/login.blade.php b/resources/views/admin/login.blade.php
new file mode 100644
index 0000000..c733597
--- /dev/null
+++ b/resources/views/admin/login.blade.php
@@ -0,0 +1,42 @@
+
+
+
+ Admin Login
+
+
+
+
+
+
+
+
+
+ @if ($errors->any())
+
+ {{ $errors->first() }}
+
+ @endif
+
+
+
+
+
+
+
+
+
diff --git a/resources/views/admin/orders.blade.php b/resources/views/admin/orders.blade.php
new file mode 100644
index 0000000..3126566
--- /dev/null
+++ b/resources/views/admin/orders.blade.php
@@ -0,0 +1,12 @@
+@extends('admin.layouts.app')
+
+@section('page-title', 'Dashboard')
+
+@section('content')
+
+
+
Welcome to the Admin orders
+
Here you can manage all system modules.
+
+
+@endsection
diff --git a/resources/views/admin/reports.blade.php b/resources/views/admin/reports.blade.php
new file mode 100644
index 0000000..be845db
--- /dev/null
+++ b/resources/views/admin/reports.blade.php
@@ -0,0 +1,12 @@
+@extends('admin.layouts.app')
+
+@section('page-title', 'Dashboard')
+
+@section('content')
+
+
+
Welcome to the Admin reports
+
Here you can manage all system modules.
+
+
+@endsection
diff --git a/resources/views/admin/requests.blade.php b/resources/views/admin/requests.blade.php
new file mode 100644
index 0000000..b95e44d
--- /dev/null
+++ b/resources/views/admin/requests.blade.php
@@ -0,0 +1,48 @@
+@extends('admin.layouts.app')
+
+@section('page-title', 'User Requests')
+
+@section('content')
+
+
+
+
+
+ 3 Pending
+ 1 Approved
+ 1 Rejected
+
+
+
+
+
+
+ | Request ID |
+ Requester |
+ Company |
+ Type |
+ Priority |
+ Date |
+ Status |
+ Actions |
+
+
+
+
+ | REQ-2024-001 |
+ Amit Patel amit.patel@example.com |
+ Tech Solutions Pvt. Ltd. |
+ New Account |
+ High |
+ 2024-09-01 |
+ Pending |
+
+
+
+ |
+
+
+
+
+
+@endsection
diff --git a/resources/views/admin/shipments.blade.php b/resources/views/admin/shipments.blade.php
new file mode 100644
index 0000000..cdd1fc1
--- /dev/null
+++ b/resources/views/admin/shipments.blade.php
@@ -0,0 +1,12 @@
+@extends('admin.layouts.app')
+
+@section('page-title', 'Dashboard')
+
+@section('content')
+
+
+
Welcome to the Admin shipment
+
Here you can manage all system modules.
+
+
+@endsection
diff --git a/resources/views/admin/staff.blade.php b/resources/views/admin/staff.blade.php
new file mode 100644
index 0000000..8a649c9
--- /dev/null
+++ b/resources/views/admin/staff.blade.php
@@ -0,0 +1,12 @@
+@extends('admin.layouts.app')
+
+@section('page-title', 'Dashboard')
+
+@section('content')
+
+
+
Welcome to the Admin staff
+
Here you can manage all system modules.
+
+
+@endsection
diff --git a/routes/web.php b/routes/web.php
index fb3bfe2..87a658b 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -1,7 +1,34 @@
group(function () {
+ Route::get('/login', [AdminAuthController::class, 'showLoginForm'])->name('admin.login');
+ Route::post('/login', [AdminAuthController::class, 'login'])->name('admin.login.submit');
+ Route::post('/logout', [AdminAuthController::class, 'logout'])->name('admin.logout');
+});
+
+// -------------------------
+// Protected Admin Panel Routes
+// -------------------------
+Route::prefix('admin')->middleware('auth:admin')->group(function () {
+ Route::get('/dashboard', fn() => view('admin.dashboard'))->name('admin.dashboard');
+ Route::get('/shipments', fn() => view('admin.shipments'))->name('admin.shipments');
+ Route::get('/invoice', fn() => view('admin.invoice'))->name('admin.invoice');
+ Route::get('/customers', fn() => view('admin.customers'))->name('admin.customers');
+ Route::get('/reports', fn() => view('admin.reports'))->name('admin.reports');
+ Route::get('/chat-support', fn() => view('admin.chat_support'))->name('admin.chat_support');
+ Route::get('/orders', fn() => view('admin.orders'))->name('admin.orders');
+ Route::get('/requests', fn() => view('admin.requests'))->name('admin.requests');
+ Route::get('/staff', fn() => view('admin.staff'))->name('admin.staff');
+ Route::get('/account', fn() => view('admin.account'))->name('admin.account');
+});