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

support users in a different db connection #209

Open
deyikong opened this issue Mar 26, 2020 · 0 comments
Open

support users in a different db connection #209

deyikong opened this issue Mar 26, 2020 · 0 comments

Comments

@deyikong
Copy link

$user = DB::table($table)

DB::table($user->table)

The above two places make it almost impossible to use a different connection than the default(actually it is possible to get around it by changing DB facade temporarily, but it's not the right way), so i would suggest changing the second constructor parameter to $connection,

  1. then at places where it needs schema, just do $connection->getSchemaBuilder(),
  2. and replace DB with $connections in the above places.
  3. And of course, you need to modify the service provider slightly as well. I would create a PR if you want it.
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

No branches or pull requests

1 participant