Reputation: 141
I'm working on a fairly large project at the moment and there is data that I'm wanting to be stored in a different database. how would I handle that in laravel?
Upvotes: 1
Views: 516
Reputation: 87779
It's simple, you can do things like:
User::connection('another-connection-name')->where('email', '[email protected]')->first();
In Laravel, switching to a different database connection at any time.
Here's also a post about this: http://fideloper.com/laravel-multiple-database-connections
Upvotes: 2