AC7 Posted February 10, 2021 Share Posted February 10, 2021 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 Quote Link to comment https://forums.phpfreaks.com/topic/312123-laravel-project-advice/ Share on other sites More sharing options...
requinix Posted February 10, 2021 Share Posted February 10, 2021 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. Quote Link to comment https://forums.phpfreaks.com/topic/312123-laravel-project-advice/#findComment-1584356 Share on other sites More sharing options...
maxxd Posted February 11, 2021 Share Posted February 11, 2021 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. Quote Link to comment https://forums.phpfreaks.com/topic/312123-laravel-project-advice/#findComment-1584380 Share on other sites More sharing options...
requinix Posted February 11, 2021 Share Posted February 11, 2021 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, ...". 1 Quote Link to comment https://forums.phpfreaks.com/topic/312123-laravel-project-advice/#findComment-1584384 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.