withRouting( web: [ __DIR__.'/../routes/web.php', __DIR__.'/../routes/auth.php', __DIR__.'/../routes/admin.php', ], commands: __DIR__.'/../routes/console.php', health: '/up', ) ->withMiddleware(function (Middleware $middleware) { $middleware->redirectUsersTo(function (Illuminate\Http\Request $request) { return $request->is('admin') || $request->is('admin/*') ? route('admin.dashboard.index') : route('index'); }); }) ->withExceptions(function (Exceptions $exceptions) { // })->create();