group(function () { Route::get('/', [HomeController::class, 'index'])->name('home.index'); Route::get('/banner/{banner}', [HomeController::class, 'banner'])->name('home.banner'); Route::middleware('auth:customer')->group(function () { // location to favorite Route::post('/locations/{location}/add-favorite', [HomeController::class, 'addFavorite'])->name('customer.location.favorite'); Route::get('/favorites', [HomeController::class, 'favorite'])->name('home.favorite'); // profile Route::get('profile', [ProfileController::class, 'index'])->name('customer.profile.index'); Route::get('profile/update', [ProfileController::class, 'show'])->name('customer.profile.show'); Route::post('profile/update', [ProfileController::class, 'update']); // verification Route::get('profile/verification', [VerificationController::class, 'index'])->name('customer.verification'); Route::post('profile/verification', [VerificationController::class, 'update']); // logout Route::post('logout', [AuthController::class, 'destroy'])->name('customer.logout'); // paylater Route::get('paylater', [PaylaterController::class, 'index'])->name('customer.paylater.index'); Route::get('paylater/trx/{paylater}', [PaylaterController::class, 'show'])->name('customer.paylater.show'); // deposite Route::get('deposit', [DepositController::class, 'index'])->name('customer.deposit.index'); Route::get('deposit/topup', [DepositController::class, 'create'])->name('customer.deposit.topup'); Route::post('deposit/topup', [DepositController::class, 'store']); Route::get('deposit/trx/{deposit}', [DepositController::class, 'show'])->name('customer.deposit.show'); Route::post('deposit/trx/{deposit}', [DepositController::class, 'update'])->name('customer.deposit.update'); // poin Route::get('poin/exchanges', [PoinExchangeController::class, 'index'])->name('customer.poin.exchange'); Route::get('poin/exchanges/{voucher}', [PoinExchangeController::class, 'exchange'])->name('customer.poin.exchange.process'); Route::get('poin', [PoinController::class, 'index'])->name('customer.poin.index'); Route::get('poin/{poin}', [PoinController::class, 'show'])->name('customer.poin.show'); // cart Route::get('cart', [CartController::class, 'index'])->name('cart.index'); Route::post('cart/process', [CartController::class, 'purchase'])->name('cart.purchase'); Route::post('cart/{voucher}', [CartController::class, 'store'])->name('cart.store'); // transaction Route::get('sale/trx', [TransactionController::class, 'index'])->name('transactions.index'); Route::get('sale/trx/{sale}', [TransactionController::class, 'show'])->name('transactions.show'); // notification Route::get('notifications', [HomeController::class, 'notification'])->name('notification.index'); }); Route::middleware('guest:customer')->group(function () { // login Route::get('/login', [AuthController::class, 'login'])->name('customer.login'); Route::post('/login', [AuthController::class, 'update']); Route::get('/login/google', [AuthController::class, 'signin_google'])->name('customer.login.google'); Route::get('/login/callback_google', [AuthController::class, 'callback_google'])->name('customer.login.callback_google'); // register Route::get('/register', [AuthController::class, 'register'])->name('customer.register'); Route::post('/register', [AuthController::class, 'store']); }); }); require_once 'admin.php';