lundi 3 septembre 2018

Laravel - multiple database connection get average from 3 tables

I have 3 databases

db_1 (students table)

id | students
1  | 42

db_2 (students table)

id | students
1  | 31

db_3 (students table)

id | students
1  | 22

In my controller, how can i get the total average of all students by using only one model (Student). and by just overriding the database connection.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire