galamz / whmcsl5
Laravel 5 WHMCS API
dev-master / 1.0.x-dev
2016-10-08 23:36 UTC
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ~6.0
- illuminate/support: ~5.2
This package is not auto-updated.
Last update: 2024-09-18 20:54:14 UTC
README
安装
首先通过Composer安装该包。最佳方式是通过终端使用Composer本身
composer require xuma/l5whmcs
或者,您可以在composer.json的require部分添加
"xuma/l5whmcs": "~1.0@dev"
别忘了执行composer update更新。
此操作完成后,只需将服务提供者和外观类添加到项目的config/app.php文件中
配置文件
创建 config/whmcs.php,内容如下
return [
'url'=>'https://whmcsurl/includes/api.php',
'username'=>'yourapiusername',
'password'=>'yourapipassword',
'user_agent'=>'Your Agent Name'
];
服务提供者
'Xuma\Whmcs\WhmcsServiceProvider',
外观
'WHMCS'=> 'Xuma\Whmcs\Facades\Whmcs',
示例
获取所有客户。
WHMCS::getClients();
获取单个客户
WHMCS::getClientsDetails($userIdOrEmail);
获取客户产品
WHMCS::getClientsProducts($userId)
获取客户域名
WHMCS::getClientsDomains($userId)
获取客户哈希密码
WHMCS::getClientsPassword($userId)