mysql - Can two laravel app use thesame database? -
i have 2 laravel projects setup follows:
app1 - web application portal nb: on remote server allow students submit applications , check status of applications online. tables include (users, students, applications, documents, comments, faqs, answers)
app2 - corp app nb: on our local server allow evaluate applications submitted via app1, view reports, manage selected applications, generate letters, etc. tables include (users, students, applications, documents, interns, attestations, supervisors, messages, etc). app2 not share login information app1. contains login info of corp employees while app1 contain login info of students , site administrator. tables common between 2 dbs students, applications, documents , via master-master replication able applications submitted app1 on remote server , on app2 can update status of applications sync app1 db. want both applications , db on thesame server , replication work , mean installing 2 instances of mysql each database on separate instance. better include tables of website - app1 (comments, faqs, answers, etc) on app2 db , make both applications use 1 database?
i think easiest solution 1 database. here link on how use laravel , lumen together: http://blog.enge.me/post/building-api-your-laravel-application-lumen
not excactly same, think principles can reused project. btw, doesn't laravel 5.2 support user roles out-of-the-box?
when think it, can 2 user tables , 2 user models, each own login controller/middleware. point students domain.com/student/login , employees domain.com/employee/login.
Comments
Post a Comment