<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

// Include route files
require __DIR__.'/web/home.php';
require __DIR__.'/web/products.php';
require __DIR__.'/web/orders.php';
require __DIR__.'/web/auth.php';     // Routes untuk autentikasi pelanggan
require __DIR__.'/web/admin.php';    // Routes untuk autentikasi admin

/*
|--------------------------------------------------------------------------
| User Dashboard Routes
|--------------------------------------------------------------------------
|
| Routes untuk dashboard pelanggan.
|
*/

Route::middleware('auth')->group(function () {
    Route::get('/dashboard', function () {
        return view('user.dashboard');
    })->name('user.dashboard');
});
// require __DIR__.'/web/cart.php';     // Uncomment saat mengimplementasikan keranjang belanja
