Feature Requests
Share ideas, discuss and vote on requests from other users in community
 

Autoload custom Eloquent models

Swehoster shared this idea 1 year ago
Completed

I really like that WHMCs uses Eloquent, and I would like to use Eloquent for my custom models as well.

That can be done, but I would love if I could specify additional directories that is included in the autoloader.

Best Answer
photo

Modules can make use of autoloading for their libraries, classes and models. Please refer to https://docs.whmcs.com/Module_Class_Autoloading for documentation relating to this.

Comments (2)

photo
1

I agree, it would really make life easier in terms of management. maybe having a 'libs' dir or something in a module could be added to autoad? if the dir doesnt exist within the module then it skips past that module etc?

photo
1

Modules can make use of autoloading for their libraries, classes and models. Please refer to https://docs.whmcs.com/Module_Class_Autoloading for documentation relating to this.