2017 © Pedro Peláez
 

library whmcpanel

motwreen/whmcpanel

image

motwreen/whmcpanel

motwreen/whmcpanel

  • Saturday, August 19, 2017
  • by motwreen
  • Repository
  • 1 Watchers
  • 2 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

WHMCPanel API Laravel Implementation

Installation

run this command in your project root folder, (*1)

composer require "motwreen/whmcpanel":"@dev"

or add the following to your composer.json, (*2)

{
    "require": {
        "motwreen/whmcpanel":"@dev"
    }
}

add the following line to your providers array in config/app.php file, (*3)

Motwreen\WHMCPanel\WHMCPanelServiceProvider::class,

and this to aliases, (*4)

'WHMCPanel' => Motwreen\WHMCPanel\WHMCPanelFacade::class,

Usage

List Accounts

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use WHMCPanel;
class TestController extends Controller
{
    public function index()
    {
        WHMCPanel::listaccts(); \\list all accounts data in server
    }
}

Suspend Accounts

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use WHMCPanel;
class TestController extends Controller
{
    public function index()
    {
        WHMCPanel::suspendacct(['user'=>'User Name','reason'=>'Reason String']); \\ Suspend Account using it's  username
    }
}

Available Methods

1-listaccts
2-listpkgs
3-accountsummary
4-createacct
5-suspendacct
6-unsuspendacct

To Do

1- make code ready for rest API methods
2- Validate For Required Parameters
3- dedicate package config into seprate files

Note:

I will provide more examples and will develope this package feel free to use,test and develop it ., (*5)

The Versions

19/08 2017

dev-master

9999999-dev

motwreen/whmcpanel

  Sources   Download

by Ahmed Gad