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

ssuhat's avatar

Laravel subdomain sites hosts as new project or not?

Hi,

Right now I'm building medium application (still working alone).

This website has several sub sites structure like below example:

1) www.example.com
2) explore.example.com
3) connect.example.com

So the current hosting method is using 1 project to host everything. I know Laravel can handle subdomain routing. But the problem is if there is a sub site to be disabled, I would need to code the disable site and redeploy the whole site again. So I was thinking if it is practical to host each sub sites in a new project as a module such that if any changes to that sub site, it will only affect that particular module while the others maintain running.

And in terms of collaboration I'm working alone maybe it's not a big deal. What if I'm working with team. and each team has their own task at sub domain (using git) and I don't want team A to look at team B works?.

Can you share any tips to achieve :

1. Flexibility on development
2. I'm using envoyer and forge. And Envoyer has maximum of 10 project ($10).

Thanks in advance.

0 likes
1 reply
unitedworx's avatar
Level 8

its up to you to decide. if most code across all 3 subdomain is the same then you are better to sticking to a single code base! if your code is vastly different between all 3 subdomain then you might be better to split them out.

its going to be a lot simpler to say

if ($subdomain=='explore'){
    App::down();
}

than maintaining 3 different setups!

1 like

Please or to participate in this conversation.