Refactor RouteServiceProvider to remove custom rate limiting for API requests

- Removed the custom rate limiter for API requests in RouteServiceProvider, simplifying the boot method.
- This change streamlines the routing setup and prepares for potential future enhancements in request handling.
This commit is contained in:
Ümit Tunç
2025-01-21 21:28:39 +03:00
parent 61c7a77431
commit bf016af07c
+1 -4
View File
@@ -24,10 +24,7 @@ class RouteServiceProvider extends ServiceProvider
*/ */
public function boot(): void public function boot(): void
{ {
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});
$this->routes(function () { $this->routes(function () {
Route::middleware('api') Route::middleware('api')
->prefix('api') ->prefix('api')