Closed jozephbrasil closed 7 years ago
Hi Jozeph,
Hooks do not have a built in method for retrieving the configuration parameters of an addon module. If you are needing the configuration parameters from the database within your hook function, you would need to fetch them at the point they are needed. You could do that using Capsule like this:
use WHMCS\Database\Capsule;
$value = Capsule::table('tbladdonmodules')
->where('module', '=', 'modulename')
->where('setting', '=', 'Setting Name')
->pluck('value');
Hope this helps.
P.S. Access to the sample files should be fixed now.
Matt
Great! Thank you for publish sample and given example code above.
No worries, if you need anything else, just let us know!
Where is the Addon Sample? I am looking for it.
How to get module_config options in the hooks.php file inside addon folder?