Jump to content

Recommended Posts

Hello All,

I have my BSc Computing dissertation coming up and need a bit of advice on whether my idea is going down the right approach from yourselves 🙂. This is what I am thinking:

  • Company A has 100 users and has the laravel app setup on the subdomain, for example https://companya.project.com where they will be allocated space for upload
  • Company B is similar, except the subdomain would be https://companyb.project.com.
  • I would have a dashboard on https://admin.project.com where I could view the stats (querying the project databases) from both of these projects.

Does the above seem logical in terms of the thought process or would it be better going down the route of having all information stored in a single database? Each of the apps would share some commonality but there will be differences to content available

Thanks

Link to comment
https://forums.phpfreaks.com/topic/312123-laravel-project-advice/
Share on other sites

If the two apps are different in the very nature of what they do then they should be separate.
If the two apps are the same in nature but different in content then it will be better to use one database and have it distinguish between what content is available for what subdomain.

While I agree with requinix in theory, it also kinda depends on the business logic. Laravel allows for multiple database connections, and with cloud services like AWS you can redirect to specific servers based on subdomain (as well as path and a variety of other criteria). So, it's possible that companya.project.com can be hosted on a completely separate server than companyb.project.com. If you're expecting each company's data set to get very large it may be best to separate the databases based on those subdomains and either use separate connections in Laravel config or use CI/CD variables to control the actual database credentials via the .env file.

5 hours ago, maxxd said:

While I agree with requinix in theory, it also kinda depends on the business logic. Laravel allows for multiple database connections, and with cloud services like AWS you can redirect to specific servers based on subdomain (as well as path and a variety of other criteria). So, it's possible that companya.project.com can be hosted on a completely separate server than companyb.project.com. If you're expecting each company's data set to get very large it may be best to separate the databases based on those subdomains and either use separate connections in Laravel config or use CI/CD variables to control the actual database credentials via the .env file.

A lot of my opinions should probably have the disclaimer "In theory, ...".

  • Haha 1
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.