All Projects → darthsoup → laravel-whmcs

darthsoup / laravel-whmcs

Licence: MIT license
WHMCS API for Laravel

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to laravel-whmcs

laravel-whmcs-up
WHMCS API client and user provider for Laravel
Stars: ✭ 22 (-46.34%)
Mutual labels:  whmcs, whmcs-api
QQConnent-For-WHMCS
WHMCS的QQ互联的模块。
Stars: ✭ 28 (-31.71%)
Mutual labels:  whmcs
docker-whmcs
Docker container ready-to-use for WHMCS environment.
Stars: ✭ 47 (+14.63%)
Mutual labels:  whmcs
WHMCS-zh-CN
WHMCS系统7.9.2-8.5.0前后台简体中文汉化
Stars: ✭ 103 (+151.22%)
Mutual labels:  whmcs
Leap
Free & Open alternative to WHMCS. Let's see if we can make it
Stars: ✭ 270 (+558.54%)
Mutual labels:  whmcs
WHMCS-JSJ-API-Pay-Gateway
WHMCS 财务系统对接金莎云免签支付API(你们怎么用,与我无瓜好吧:)
Stars: ✭ 58 (+41.46%)
Mutual labels:  whmcs
whmcs-addon
GOGETSSL WHMCS SSL Addon
Stars: ✭ 28 (-31.71%)
Mutual labels:  whmcs
f2faliPay-For-WHMCS
aliPay face to face Pay!
Stars: ✭ 15 (-63.41%)
Mutual labels:  whmcs
whmcs autoauth
Automatic authentication via link in WHMCS template emails.
Stars: ✭ 25 (-39.02%)
Mutual labels:  whmcs
whmcs
WHMCS Module for Pterodactyl (v0.7.3 and higher)
Stars: ✭ 127 (+209.76%)
Mutual labels:  whmcs
PUQ WHMCS-Public-Nextcloud
Module for the WHMCS system. For manage NextCloud users as a product.
Stars: ✭ 17 (-58.54%)
Mutual labels:  whmcs
SolusVM-Premium-For-WHMCS
NeWorld SolusVM Premium Server Module For WHMCS
Stars: ✭ 20 (-51.22%)
Mutual labels:  whmcs
whmcs-vultr
Vultr Module for WHMCS
Stars: ✭ 86 (+109.76%)
Mutual labels:  whmcs
WHMCS-Action-Hook-Factory
Free collection of Action Hooks, Reports and Modules to perfect your WHMCS
Stars: ✭ 120 (+192.68%)
Mutual labels:  whmcs
MugglePay
Make Crypto Payment Easy 让数字货币支付更简单
Stars: ✭ 176 (+329.27%)
Mutual labels:  whmcs
WHMCS-Discord-Notifications
A hook to push a range of different WHMCS notifications instantly to a Discord channel.
Stars: ✭ 52 (+26.83%)
Mutual labels:  whmcs
SHOUTcast-Manager
[DEPRECATED] NO LONGER MAINTAINED - A PHP SHOUTcast hosting tool with support for PHP 5.x & 7.x with SHOUTcast v1 & v2)
Stars: ✭ 24 (-41.46%)
Mutual labels:  whmcs

Laravel WHMCS

Latest Stable Version Total Downloads License

An interface for interaction with the WHMCS API in Laravel. This Package is heavily inspired by Laravel GitLab created by Graham Campbell.

Notice:

The legacy version 0.3 can be found here

Installation

Laravel WHMCS requires PHP ^7.4 | ^8.0 with at least Laravel version 6.

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

composer require darthsoup/laravel-whmcs

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

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

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

Configuration

To get started, you'll need to publish vendor assets for Laravel-Whmcs.

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

This will create the config/whmcs.php file in your app, modify it to set your configuration.

Default Connection

The option default is where you specify the default connection.

Whmcs Connections

The option connections is where you can add multiple connections to your whmcs instances. You can choose between both API connection types from whmcs. These methods are password and token. Example connections has been included, but you can add as many connections you would like.

Usage

via dependency injection

If you prefer to use Dependency Injection, you can easily add it to your controller as below:

use DarthSoup\Whmcs\WhmcsManager;

class WhmcsController extends Controller
{
    private WhmcsManager $whmcsManager;

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

    public function index()
    {
        $result = $this->whmcsManager->client()->getClients();
        dd($result);
    }
}

Via Facade

If you prefer the classic Laravel facade style, this might be the way to go:

use \DarthSoup\Whmcs\Facades\Whmcs;
# or
use \Whmcs;

\Whmcs::Client()->getClientsDomains(['clientid' => '1']);

Real examples

use \DarthSoup\Whmcs\Facades\Whmcs;

# Obtaining a list of domains purchased by the customer
\Whmcs::Client()->getClientsDomains(['clientid' => '1']);

# Obtaining a list of products purchased by the customer
\Whmcs::Client()->getClientsProducts(['clientid' => '12345']);

# Retrieve a specific invoice
\Whmcs::Billing()->getInvoice(['invoiceid' => '1337']);

# Retrieves all Orders from the system
\Whmcs::Orders()->getOrders();

# Obtain internal users
\Whmcs::Users()->getUsers(['search' => '[email protected]']);

# Custom Method (in case you added custom endpoints) 
\Whmcs::Custom()-><myEndpoint>(['foo' => 'bar']);

For more information on how to use the WhmcsApi Client DarthSoup\WhmcsApi\Client class, check out the documentation at https://github.com/darthsoup/php-whmcs-api.

Support

Please open an issue in github

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].