2017 © Pedro Peláez
 

library laravel-whmcs

A simple Laravel interface for interacting with the WHMCS API.

image

corydemille/laravel-whmcs

A simple Laravel interface for interacting with the WHMCS API.

  • Thursday, June 1, 2017
  • by corydemille
  • Repository
  • 1 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

laravel-whmcs (WORK IN PROGRESS)

A simple Laravel interface for interacting with the WHMCS API., (*1)

Installation

To install the package, simply add the following to your Laravel installation's composer.json file:, (*2)

"require": {
    "laravel/framework": "5.*",
    "corydemille/laravel-whmcs": "dev-master"
},

Run composer update to pull in the files., (*3)

Then, add the following Service Provider to your providers array in your config/app.php file:, (*4)

'providers' => array(
    ...
    WHMCS\WHMCSServiceProvider::class
);

From the command-line run: php artisan vendor:publish, (*5)

Configuration

Open config/whmcs.php and configure the api endpoint and credentials:, (*6)

return [
    // API URL
    'url'       =>  'http://url.com/whmcs/includes/api.php',

    // API USERNAME
    'username'  =>  'admin_user',

    // API PASSWORD
    'password'  =>  'password123',

    // API RESPONSE TYPE
    'response_type' => 'json', // json or xml
];

Usage

// app/Http/routes.php

Route::get('/products/{client_id}', function() {

    $start = 0;
    $limit = 25;

    $products = WHMCS::getClientProducts($client_id, $start, $limit);

    return json_encode($products);
});

WHMCS Docs

http://docs.whmcs.com/API, (*7)

The Versions

01/06 2017

dev-master

9999999-dev

A simple Laravel interface for interacting with the WHMCS API.

  Sources   Download

MIT

The Requires

 

laravel api whmcs