Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Naysoewin's avatar

api base routes conflict with subdomain routes

Hello,

I register some subdomain routes before base domain's , It is working fine for me

web.php

Route::domain("admin." . Config::get("app.short_url"))->group(function () {
    // Routes
});

// some basedomain routes

but when i try to register api route as base domain , all of api routes are attached with subdomain like =>

http://admin.localhost:8000/api/v1/****

could someone please let me know how should i avoid this small issue.Thanks

0 likes
0 replies

Please or to participate in this conversation.