Код: Выделить всё
RouteServiceProvider.phpКод: Выделить всё
/**
* Define your route model bindings, pattern filters, and other route configuration.
*/
public function boot(): void
{
$this->configureRateLimiting();
$this->routes(function () {
$this->registerCentralDomainRoutes();
config('app.env') == 'local' && Route::middleware('web')->group(base_path('routes/test.php'));
});
}
Код: Выделить всё
bootstrap/app.phpКод: Выделить всё
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: [
base_path('routes/web/routes.php'),
base_path('routes/web/auth.php'),
base_path('routes/web/agent.php'),
...(config('app.env') === 'local' ? [base_path('routes/web/test.php')] : [],
],
api: base_path('routes/api.php'),
commands: base_path('routes/console/routes.php'),
health: '/up',
)
Как я могу это сделать в Laravel 12?>
Подробнее здесь: https://stackoverflow.com/questions/798 ... servicepro
Мобильная версия