configureRateLimiting(); $this->routes(function () { /** * Define the "api" routes for the application. * * These routes are typically stateless. */ Route::prefix('api') ->middleware('api') ->namespace($this->namespace) ->group(base_path('routes/api.php')); /** * Define the "web" routes for the application. * * These routes all receive session state, CSRF protection, etc. */ Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/web.php')); }); } /** * Configure the rate limiters for the application. * * @return void */ protected function configureRateLimiting() { RateLimiter::for('api', function (Request $request) { return Limit::perMinute(60); }); } }