joselara/cpanel-laravel

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (1.0) of this package.

cPanel API Package for Laravel

1.0 2013-06-10 02:29 UTC

This package is not auto-updated.

Last update: 2022-12-05 20:08:12 UTC


README

originally forked from https://github.com/adelynx/cpanel

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require joselara/cpanel-laravel.

"require": {
	"laravel/framework": "4.0.*",
	"joselara/cpanel-laravel": "dev-master"
}

Next, update Composer from the Terminal:

composer update

Once this operation completes add the service provider, aliases and configuration file.

1 - Provider: Open app/config/app.php, and add a new item to the providers array.

'JoseLara\Cpanel\CpanelServiceProvider'

2 - Provider: Open app/config/app.php, and add a new item to the facade array.

'Cpanel' => 'JoseLara\Cpanel\Facades\Cpanel',

3 - Publish Config

php artisan config:publish joselara/cpanel-laravel

That's it! You're all set to go.

Usage

<?php

class CpanelController extends Controller {

    public function getListAccounts()
    {
         try {

                $listaccts = array(json_decode(Cpanel::listaccts(), true));
                return $listaccts;

         } catch (Exception $e) {
                return 'Exception: ' .$e->getMessage();
         }

    }

}