I plan to make 2 different laravel projects ( At Dedicated Server where each project has a different virtual subdomain ) that communicate with the same mysql database (at localhost).
The project number 1 has a table in database named "arguments" (eloquent model ) and the project number 2 must use this table (read and updates).
I have already setup the project No 1 and now am wondering on how implementing th project no 2. I think that i should write again in Project no 2 an exactly same eloquent model for this table. But is it right? Is it clear? What will be happen when i make migrations?
Thank you in advance!
P.S: Perhaps in the future bought another one dedicated server only for the project No 2....
I had the same issue, what I did was create a library (eloquent model) that handles all those things. Just like you mentioned.
Hi ruk33!! Thanks for your answer!
Do you Have any problems with migrations?
You're welcome. No I didn't. You shouldn't have any problems with migrations though (at least I can't imagine one now).
Yes, just define the same Eloquent model again in project #2.
To be on the safe side though, you should create and execude the migration-files only from one project's context.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community