Wallogit.com
2017 © Pedro Peláez
motwreen/whmcpanel
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,
<?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
}
}
<?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
}
}
1-listaccts 2-listpkgs 3-accountsummary 4-createacct 5-suspendacct 6-unsuspendacct
1- make code ready for rest API methods 2- Validate For Required Parameters 3- dedicate package config into seprate files
I will provide more examples and will develope this package feel free to use,test and develop it ., (*5)