In your RouteServiceProvider you can explicitly assign files. Like so:
$this->routes(function () {
Route::middleware('web')
->group(base_path('routes/tenant-web-app.php'));
});
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi I wanted to add new file to routes directory for better organization of app routes. Documentation says that Laravel load all files from routes directory automaticaly. But Its seems it does not work. I am getting not found excaption. If I add this line to other routes file it works fine but it seems little dumb.
Route::group([], __DIR__ . '/tenant-web-app.php');
What am I doing wrong?
Please or to participate in this conversation.