What is the purpose of so many different databases? Each customer has their own or?
How i can made rule for API?
I try to make API that receive data from 4 different connection which have same 5 databases, totally: connection1 = db1, db2, db3, db4,db5 connection2 = db6, db7, db8, db9, db10 connection3 = db11, db12, db13, db14, db15 connection4 = db16, db17, db18, db19, db20 All routes of API required string "data" in request which mean db`s to receive data. How i can make rules for all API routes that mean: If $request->input('data') == 1 that we connect to connection1->db1 if $request->input('data') == 13 that we connect to connection3->db13
@aurorame I have never had to do this, but if I did I would try with global scopes https://laravel.com/docs/9.x/eloquent#global-scopes
Please or to participate in this conversation.