Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple connections to be defined #8

Closed
wants to merge 3 commits into from

Conversation

blaisedufrain
Copy link

No description provided.

@drewjbartlett
Copy link
Owner

@blaisedufrain thanks a ton for doing this! Could you provide me with a better description of what it is you're changing and adding?

@blaisedufrain
Copy link
Author

I added some to the read me. I am adding the ability to boot eloquent for multiple named connections. For example if you need to connect to a second mysql instance in the same request depending on the eloquent model. See https://laravel.com/docs/5.4/database#using-multiple-database-connections.

In my case I want to pull a record from one mysql instance, transform it, and save it as a new record in a different mysql instance.

I added a new function to allow a user to create multiple connections by passing an array of connection configurations. This is a non breaking change, as a configuration using your original structure will continue to produce a single connection, but if you set a new config option multiple_connections to true, then it will run the new process.

Let me know if you need more.

@blaisedufrain
Copy link
Author

Is there anything else you needed for this? Everything look ok?

@drewjbartlett
Copy link
Owner

@blaisedufrain apologies. I will have one last look tonight and merge :)

@blaisedufrain
Copy link
Author

blaisedufrain commented Jun 5, 2018

I'm actually going to close this PR and open an identical one coming from a non master branch from my repo. That way I can use my master branch on the forked repo while waiting on this to merge. Sorry for confusion.

#9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants