configureRateLimiting(); // Установите путь к маршрутам $this->routesPath = base_path('routes'); $this->routes(function () { Route::middleware('web') ->group($this->routesPath . '/web.php'); Route::middleware(['web', 'auth']) ->prefix('admin') ->group($this->routesPath . '/admin.php'); }); } /** * Configure the rate limiters for the application. * * @return void */ protected function configureRateLimiting() { RateLimiter::for('api', function (Request $request) { return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); }); } }