admin login completed

This commit is contained in:
Abhishek Mali
2025-11-06 17:09:52 +05:30
parent ccbef09484
commit 3c4727acd9
18 changed files with 504 additions and 0 deletions

View File

@@ -1,7 +1,34 @@
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\AdminAuthController;
// Default welcome page
Route::get('/', function () {
return view('welcome');
});
// -------------------------
// Admin Authentication Routes
// -------------------------
Route::prefix('admin')->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');
});