Jump to content
  • 0

Import complete WHMCS External Libraries



5 answers to this question

Recommended Posts

  • 0

Capsule is a wrapper Eloquent.   Just get Eloquent from github and put it some where central for such libs.  Then in phpStorm, edit the project settings and add the directory as a resource root.   Have not tested with capsule, just with models, but should be able to use:

use Illuminate\Database\Capsule\Manager as Capsule;


Link to comment
Share on other sites

  • 0

Create directory WHMCS/Database and create file Capsule.php .  In that file put in:

namespace WHMCS\Database\Capsule;
use Illuminate\Database\Capsule\Manager;

class Capsule extends Manager


Go to directories mentioned above and add that new directory to the resource roots.   I create create classes and fill them with variables and do this for their other classes so phpstorm will give hints.   Stubs are good or at least that is what I call it.  Just don't include that file within your actual module / code though. 

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.

Answer this question...

×   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