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