configureRateLimiting(); $this->routes(function () { Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/update.php')); }); } /** * Configure the rate limiters for the application. * * @return void */ protected function configureRateLimiting() { RateLimiter::for('api', function (Request $request) { return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); }); } }