withRouting( web: [ __DIR__.'/../routes/web.php', __DIR__.'/../routes/auth.php', __DIR__.'/../routes/dashboard.php', __DIR__.'/../routes/admins.php', ], commands: __DIR__.'/../routes/console.php', health: '/up', ) ->withMiddleware(function (Middleware $middleware) { $middleware->redirectGuestsTo(fn(Request $request)=>route('auth.login.index')); $middleware->alias([ 'admin.auth' => AdminAuth::class, 'admin.guest' => AdminGuest::class, ]); }) ->withExceptions(function (Exceptions $exceptions) { // })->create();