PHPackages                             unbug4120/directadmin-api - 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. unbug4120/directadmin-api

ActiveLibrary

unbug4120/directadmin-api
=========================

Simple wrapper for directadmin api.

131PHP

Since Sep 21Pushed 4y ago1 watchersCompare

[ Source](https://github.com/unbug4120/directadmin-api)[ Packagist](https://packagist.org/packages/unbug4120/directadmin-api)[ RSS](/packages/unbug4120-directadmin-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Simple wrapper Laravel Package for DirectAdmin API
==================================================

[](#simple-wrapper-laravel-package-for-directadmin-api)

Support Laravel 7.x

Installation
------------

[](#installation)

### Step 1. install the package

[](#step-1-install-the-package)

```
composer require unbug4120/directadmin-api

```

### Step 2. publish config file

[](#step-2-publish-config-file)

publish config file with this command

```
php artisan vendor:publish --provider="Unbug4120\LaravelDirectAdmin\DirectAdminServiceProvider"
```

### Step 3. add your directadmin credential on .env file

[](#step-3-add-your-directadmin-credential-on-env-file)

```
DIRECTADMIN_HOSTNAME=your-directadmin-hostname
DIRECTADMIN_PORT=2222
DIRECTADMIN_USERNAME=your-username
DIRECTADMIN_PASSWORD="your-directadmin-password"
DIRECTADMIN_SERVERIP=your-server-ip
```

### Step 4. clear config cache

[](#step-4-clear-config-cache)

and then don't forget to clear the config cache file with this command

```
php artisan config:cache
```

Usage
-----

[](#usage)

code example:

### Get user list

[](#get-user-list)

```
use Unbug4120\LaravelDirectAdmin\Facades\DirectAdmin;

$result = DirectAdmin::getUserList();

dd($result);
```

### Create new account

[](#create-new-account)

To create new account you must add `Unbug4120\LaravelDirectAdmin\NewAccountParameter` class for pass the new account parameter.

```
use Unbug4120\LaravelDirectAdmin\Facades\DirectAdmin;
use Unbug4120\LaravelDirectAdmin\NewAccountParameter;

$newAccount = new NewAccountParameter();
$newAccount->domain = 'new-domain.com';
$newAccount->username = 'new-username';
$newAccount->passwd = 'new-userpass';
$newAccount->package = 'yourhostpackage';
$newAccount->email = 'usermail@gmail.com';

$result = DirectAdmin::createNewAccount($newAccount);

dd($result);
```

### Delete an account

[](#delete-an-account)

```
use Unbug4120\LaravelDirectAdmin\Facades\DirectAdmin;

$userToDelete = 'usertodelete';

$result = DirectAdmin::deleteAccount($userToDelete);

dd($result);
```

### Suspend an account

[](#suspend-an-account)

```
use Unbug4120\LaravelDirectAdmin\Facades\DirectAdmin;

$userToSuspend = 'usertosuspend';

$result = DirectAdmin::suspendAccount($userToSuspend);

dd($result);
```

### Unsuspend an account

[](#unsuspend-an-account)

```
use Unbug4120\LaravelDirectAdmin\Facades\DirectAdmin;

$userToUnsuspend = 'usertounsuspend';

$result = DirectAdmin::unsuspendAccount($userToUnsuspend);

dd($result);
```

Contributions
-------------

[](#contributions)

As the DirectAdmin API keeps expanding pull requests are welcomed, as are requests for specific functionality. Pull requests should in general include proper unit tests for the implemented or corrected functions.

For more information about unit testing see the `README.md` in the tests folder.

Legal
-----

[](#legal)

This software was developed for internal use. It is shared with the general public under the permissive MIT license, without any guarantee of fitness for any particular purpose. Refer to the included LICENSE file for more details.

The project is not in any way affiliated with JBMC Software or its employees.

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1df8f913464bd83e1c8253e5bd76f9ef9aeb7b38e5006446799d31a96e963540?d=identicon)[duongdat](/maintainers/duongdat)

---

Top Contributors

[![unbug4120](https://avatars.githubusercontent.com/u/54050934?v=4)](https://github.com/unbug4120 "unbug4120 (3 commits)")

### Embed Badge

![Health badge](/badges/unbug4120-directadmin-api/health.svg)

```
[![Health](https://phpackages.com/badges/unbug4120-directadmin-api/health.svg)](https://phpackages.com/packages/unbug4120-directadmin-api)
```

PHPackages © 2026

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