1

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?

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

1 Comment

Ahh it all makes sense now :) Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.