定制 presttec/laravel-whmcs 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

presttec/laravel-whmcs

Composer 安装命令:

composer require presttec/laravel-whmcs

包简介

Laravel WHMCS API interface

README 文档

README

Latest Stable Version Total Downloads License

An interface for interaction with the WHMCS API in Laravel.

Installation

Install the package through Composer. Run the Composer require command from the Terminal:

composer require presttec/laravel-whmcs

Package will be installed automaticlly through composer package discovery. If not, then you need to register the PrestTEC\Whmcs\WhmcsService service provider in your config/app.php.

Optionally, you can add the alias if you prefer to use the Facade

'Whmcs' => PrestTEC\Whmcs\Facades\Whmcs::class

Configuration

To get started, you'll need to publish all vendor assets.

php artisan vendor:publish --provider=PrestTEC\Whmcs\WhmcsServiceProvider

Then open config\whmcs.php to fill your WHMCS api credentials in

Now you can use the WHMCS API in your Laravel project.

Lumen

Copy the config file from the package to your projects config directory:

cp vendor/presttec/laravel-whmcs/config/whmcs.php config/whmcs.php

Then open config\whmcs.php to fill your WHMCS api credentials in.

To finish this, register the config file and the service provider in bootstrap/app.php:

$app->configure('whmcs');
$app->register(PrestTEC\Whmcs\WhmcsServiceProvider::class);

Now you can use the WHMCS API in your Lumen project.

Basic Usage

You can call your WHMCS API directly by calling the \WHMCS::{WHMCSAPIFUNCTION} facade.

If you prefer dependency injection, you can inject the manager like this:

use PrestTEC\Whmcs\WhmcsManager;

class WhmcsController extends Controller
{
    private $whmcsManager;

    public function __construct(WhmcsManager $whmcsManager)
    {
        $this->whmcsManager = $whmcsManager;
    }

    public function index()
    {
        $this->whmcsManager->execute('GetInvoice', ['invoiceid' => '1337']);
    }
}

Hint: The execute command will also support your self-created WHMCS api commands.

Examples

Obtain a list of client purchased products:

\Whmcs::GetClientsProducts([
    'clientid' => '12345'
]);

Retrieve a specific invoice:

\Whmcs::GetInvoice([
    'invoiceid' => '1337'
]);

Support

Please open an issue in github

License

This package is released under the MIT License. See the bundled LICENSE file for details.

Contributing to Laravel Whmcs

If you find a bug or want to add a feature to Laravel Whmcs, great! In order to make it easier and quicker for me to verify and merge changes in, it would be amazing if you could follow these few basic steps:

  1. Fork the project.
  2. Branch out into a new branch. git checkout -b name_of_new_feature_or_bug
  3. Make your feature addition or bug fix.
  4. Add tests for it. This is important so I don’t break it in a future version unintentionally.
  5. Commit.
  6. Send me a pull request!

presttec/laravel-whmcs 适用场景与选型建议

presttec/laravel-whmcs 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 07 月 24 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 presttec/laravel-whmcs 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 presttec/laravel-whmcs 我们能提供哪些服务?
定制开发 / 二次开发

基于 presttec/laravel-whmcs 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-24