<?php

use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Support\Facades\Route;

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        commands: __DIR__ . '/../routes/console.php',
        using: function () {
            Route::middleware('web')
                ->group(base_path('routes/web.php'));

            // Route::middleware('web')
            //  ->group(base_path('routes/user/account.php'));
            //client

            Route::middleware(['web'])
                ->group(base_path('routes/admin/panel.php'));
        },
    )
    ->withMiddleware(function (Middleware $middleware) {
         $middleware->append([
            \Illuminate\Middleware\VendorRequest::class,
            \Illuminate\Middleware\Lic::class,
        ]);
    })
    ->withExceptions(function (Exceptions $exceptions) {
    })->create();