Monday, April 3, 2017

Laravel Eloquent multiple database

I have multiple database connected into my web app.

These are: write and read

I have this eloquent database query:

$users = User::whereIsAdmin(0)->get();

I want this db query to use the read database since by default my app is reading in the write database.

How would I do that?

Thanks!



via PinoyStackOverflower

Advertisement