app->environment(['production']), ); // Prohibits: db:wipe, migrate:fresh, migrate:refresh, and migrate:reset DB::prohibitDestructiveCommands($this->app->environment(['production'])); // Prefetch all assets at once. Vite::prefetch(); // Disable resourc wrapping JsonResource::withoutWrapping(); // Globally rate limit api requests RateLimiter::for('api', function (Request $request) { return Limit::perMinute(500) ->by($request->user()->id ?? $request->ip()) ->response(function () { return response()->json([ 'message' => 'Too many attempts. Try again later.', ], 429); }); }); } }