PHPackages                             swalker2/cpanel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. swalker2/cpanel

ActiveLibrary[API Development](/categories/api)

swalker2/cpanel
===============

the simplest PHP implementation of the cpanel versio 2 api for Laravel

v1.1(9y ago)3532MITPHPPHP &gt;=5.6.4

Since Feb 3Pushed 9y ago1 watchersCompare

[ Source](https://github.com/swalker2/laravel-cpanel)[ Packagist](https://packagist.org/packages/swalker2/cpanel)[ RSS](/packages/swalker2-cpanel/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

\#swalker2 - Cpanel

The simplest PHP implementation of the cpanel version 2 api for Laravel

At the moment suporting only the Zone Edit and Email modules

You can write your own modules if you dig into the [Guide to cPanel API 2](https://documentation.cpanel.net/display/SDK/Guide+to+cPanel+API+2)

### Install

[](#install)

Require this package with composer using the following command:

```
composer require swalker2/cpanel
```

After updating composer, add the service provider to the `providers` array in `config/app.php`

```
Swalker2\Cpanel\CpanelServiceProvider::class,
```

Also, publish the configuration file using the following command:

```
php artisan vendor:publish --tag=swalker2.cpanel
```

Finally, add the .env variables:

```
CPANEL_HOST=https://domain.com
CPANEL_PORT=2083
CPANEL_USERNAME=yourname
CPANEL_PASSWORD=yourpass

```

### But how do I use it?

[](#but-how-do-i-use-it)

After completing the instalation steps, you simply make a cpanel instance, like so:

```
	$cpanel = app()->make(Cpanel::class);
```

And then you can call the module implementations

```
	dd(
		$cpanel->zoneEdit('mydomain.com')->fetch()
	);
```

Note that the Modules that you create can be instantiated individually:

```
	$mymodule = new MyCpanelModule();
	dd(
		$mymodule->doSomething()
	);
```

### Writing a module

[](#writing-a-module)

To write a module you need to extend the class `Swalker2\CpanelFunction`like so:

```
namespace App;

use Swalker2\Cpanel\CpanelBaseModule;

class CpanelModule extends CpanelBaseModule
{

    function __construct()
    {
        parent::__construct();
        $this->cpanel->mergeFields([
            'cpanel_jsonapi_module' => 'ModuleName', //reference this from the Guide to cPanel API 2
        ]);
    }

    public function someAction()
    {
        $this->cpanel->mergeFields([
            'cpanel_jsonapi_func' => 'some_action',
        ]);

        $response = $this->getApiData();

        //do something with the response
    }
}
```

### Contributing

[](#contributing)

Feel free to send pull requests, not just bug reports.

"Bug reports" may also be sent in the form of a pull request containing a failing test.

However, if you file a bug report, your issue should contain a title and a clear description of the issue. You should also include as much relevant information as possible and a code sample that demonstrates the issue. The goal of a bug report is to make it easy for yourself - and others - to replicate the bug and develop a fix.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3434d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/331050?v=4)[swalker](/maintainers/swalker)[@swalker](https://github.com/swalker)

---

Top Contributors

[![eduPHP](https://avatars.githubusercontent.com/u/12203605?v=4)](https://github.com/eduPHP "eduPHP (8 commits)")[![swalker2](https://avatars.githubusercontent.com/u/147558839?v=4)](https://github.com/swalker2 "swalker2 (3 commits)")

---

Tags

laravelcpanel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/swalker2-cpanel/health.svg)

```
[![Health](https://phpackages.com/badges/swalker2-cpanel/health.svg)](https://phpackages.com/packages/swalker2-cpanel)
```

###  Alternatives

[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[smodav/mpesa

M-Pesa API implementation

16167.1k1](/packages/smodav-mpesa)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.1k1](/packages/jasara-php-amzn-selling-partner-api)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
