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

whiteWolf's avatar

Can use same database for two laravel projects?

If it can what files must be changed? I already finished the backend Laravel project. I got stuck in creating a second Laravel project using the same database for login purposes (for login purposes I used the Laravel Jetstream)

I am doing a project client task request management system for a small software company. In this system, I will plan to create client pages on one Laravel project and software company employee pages and tables also created on the software company side Laravel project.

My 1st project is used for frontend purposes. My 2nd project was used for backend purposes.

0 likes
4 replies
hupp's avatar

@whitewolf Why you need than two different project. Every Project has Front End and Backend, Consider just like that and make different route prefix and sperate with different required middleware it will done your job. Let me know if you still have any query or need any kind of help.

1 like
whiteWolf's avatar

@hupp The backend project is only visible to the company employees(super admins, admins, and work users) which means there is a frontend for company employees doing their tasks.

Client view is another project. Client registrations are done by company admins.

My requirement is when the company admin creates an account from the company side for the client, he/she can log in to this account in across the second project.

I am a beginner to Laravel. is there any other method to do my task?

chiefguru's avatar

Hi @whitewolf we have two Laravel projects sharing a common database. We have a public facing staff portal where our part-time staff can review their allocations, upload material, log their work, request payment etc. We also have an administration front-end where our admin staff generate and/or massage the data that our part-time staff see, review uploaded material, approve payments etc. Both systems have separate authentication databases.

1 like

Please or to participate in this conversation.