Seeding in laravel for multiple databases
I am working on a school project with multiyear database built in laravel.
My requirement is to feed data for every new academic year in some tables. I have a main(superadmin) db and separate school’s db for every school. I need to connect to school db, n process is i have kept superadmin db details in .env file then it fetches particular school’s db details and makes a connection to that school db through middleware.
My question is when i executes migration and seeding command it connects to superadmin db and performs respective operation on same. But i want to execute migration/seeding one by one for every school’s db.
Please provide suggestions. Thank you.
from Laravel Questions and Answers https://laravelquestions.com/laravel/seeding-in-laravel-for-multiple-databases/
via Lzo Media
No comments:
Post a Comment