Is it possible to have 3 Laravel codebases share 1 database, but each with each own users? Those separated users should be able to access only the front-ends of each codebase they belong to.
Why 3 codebases and 1 Database, one might ask? Maybe it's stupid, but I like to treat each as a separate project.
The plan is to have
3 separate git
3 separate servers
1 separate server for the database
1 domain for the publicly accessible codebase
2 subdomains for the 2 back-offices (the other 2 codebases).
I'd like opinions and suggestions of people with experience in large projects. Am I adding complexity by developing the project this way? I'm planning to develop it up to a certain point and hire 3 devs to assign each a codebase to continue the work together with them.
Have a seperate Laravel code base for migrations. Make sure all devs have to use that codebase to create migrations.
Use a column on the user table to indicate which system they are authorised in. Bear in mind that you will have multiple users with the same email address so you will need to scope the users each time they want to register so that uniqueness is only checked in the one system.
Bear in mind that if you have shared users between applications then they will possibly become confused about passwords for each
I could merge my 3 laravel codebases into one. My only worry is how to keep users separated. The publicly accessible website is open to guest visitors but will have registration for visitors to create profiles on the platform. The other 2 front-ends are for administration by the staff of the company behind the platform and for customers/clients of the company. This can't be merged into one, it's a completely different output for both front-ends. Also, the admin subdomain front-end will be accessible only by the company's IP address.
@laracastsluvr Why are you so hell-bent on having separate users? A user is a user. If your application has multiple front-ends, then use authorisation to restrict what a user can see based on their role.