2025-11-04 10:19:07 +05:30
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Route;
|
2025-11-06 17:09:52 +05:30
|
|
|
use App\Http\Controllers\AdminAuthController;
|
2025-11-04 10:19:07 +05:30
|
|
|
|
2025-11-06 17:09:52 +05:30
|
|
|
// Default welcome page
|
2025-11-04 10:19:07 +05:30
|
|
|
Route::get('/', function () {
|
|
|
|
|
return view('welcome');
|
|
|
|
|
});
|
2025-11-06 17:09:52 +05:30
|
|
|
|
|
|
|
|
// -------------------------
|
|
|
|
|
// 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');
|
|
|
|
|
});
|