Jump to content

Additional database connection using Capsule


kUdtiHaEX

Recommended Posts

I need to sync data between WHMCS and some other database and for that I've hooked into daily cron. But what I need is ability to connect to that other database using Capsule.

I've tried to use `addConnection` method together with `setAsGlobal` and `bootEloquent` but no matter what I do I either cannot connect to it or I overwrite the `default` connection.  I know how this stuff works in Laravel, but obviously something is different here.

So - how can I, inside my module, configure Capsule to use additional database connection for certain queries?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated