PHPackages                             solitweb/laravel-directadmin - 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. solitweb/laravel-directadmin

ActiveLibrary[API Development](/categories/api)

solitweb/laravel-directadmin
============================

Laravel 5 DirectAdmin API wrapper

1.0.14(3mo ago)212.2k14MITPHPPHP ~5.6|~7.0|~7.1|~7.2|~7.3|~7.4|~8.0|~8.1|~8.2|~8.3|~8.4|~8.5CI failing

Since Nov 18Pushed 3mo ago4 watchersCompare

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

READMEChangelog (10)Dependencies (4)Versions (16)Used By (0)

Laravel 5 DirectAdmin API wrapper
=================================

[](#laravel-5-directadmin-api-wrapper)

[![Latest Version](https://camo.githubusercontent.com/3a76d8227fd99d99ddab1450a28696e6119057977d3e16802423213f791b4fdc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f736f6c69747765622f6c61726176656c2d64697265637461646d696e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/laravel-solitweb/directadmin/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/480858fd937bf5a3d2d85ac96bba50c110fd4692a79afb6df68d0185bd9f24ff/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f736f6c69747765622f6c61726176656c2d64697265637461646d696e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/solitweb/laravel-directadmin)[![Total Downloads](https://camo.githubusercontent.com/dc12390c24194ee8c98146ffbae73a7ceeb5e9081c1602fcdfff1805484a171b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f6c69747765622f6c61726176656c2d64697265637461646d696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/solitweb/laravel-directadmin)

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

[](#installation)

You can install this package via Composer using:

```
composer require solitweb/laravel-directadmin
```

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Laravel 5.5+:
-------------

[](#laravel-55)

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

```
// config/app.php
'providers' => [
    ...
    Solitweb\LaravelDirectAdmin\LaravelDirectAdminServiceProvider::class,
];
```

Optionally, register the facade:

```
// config/app.php
'aliases' => [
    ...
    'DirectAdmin' => Solitweb\LaravelDirectAdmin\LaravelDirectAdminFacade::class,
];
```

To publish the config file to app/config/laravel-directadmin.php run:

```
php artisan vendor:publish --provider="Solitweb\LaravelDirectAdmin\LaravelDirectAdminServiceProvider"
```

Usage
-----

[](#usage)

Import the facade at the top of your file.

```
use DirectAdmin;
```

### Examples

[](#examples)

This will return an array of all users currently owned the reseller:

```
return DirectAdmin::get()->request('SHOW_USERS');
```

This will return an array of the user's usages:

```
return DirectAdmin::get()->request('SHOW_USER_USAGE', ['user' => 'john']);
```

For more commands check the [DirectAdmin API docs](https://www.directadmin.com/api.php). You have to copy the command without the `CMD_API_`.

### Magic Methods

[](#magic-methods)

It's also possible to make use of magic methods to get the data from the API as shown below:

```
$users = DirectAdmin::getShowAllUsers();
// Translates to DirectAdmin->get()->request('SHOW_ALL_USERS');
```

Arguments are also supported when using a magic method:

```
return DirectAdmin::postAccountAdmin([
    'action' => 'create',
    'username' => 'New Admin',
    ....
]);
// Translates to DirectAdmin->post()->request('ACCOUNT_ADMIN', [arguments]);
```

Magic Methods are named after the method (get/post) followed by the command without `CMD_API_` in CamelCase. So, if you want to make a GET request with the CMD\_API\_SHOW\_ALL\_USERS command, the magic method would be `getShowAllUsers()`.

### JSON Support

[](#json-support)

It's possible to use JSON support, this allows using the HTTP code for feedback. No more annoying login screen errors on invalid login parameters.

```
$data = DirectAdmin::get()->requestJson('SHOW_USERS');
$response = DirectAdmin::get_status_code();
```

Also added magic methods support:

```
$data = DirectAdmin::getJsonShowUsers();
```

### Change user during runtime

[](#change-user-during-runtime)

It's also possible to change the user during runtime as shown below:

```
DirectAdmin::set_login('username', 'password')
```

Credits
-------

[](#credits)

- [Phi1 'l0rdphi1' Stier](mailto:l0rdphi1@liquenox.net)
- [Joshua de Gier / Pendo](https://github.com/PendoNL)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance78

Regular maintenance activity

Popularity28

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~242 days

Recently: every ~473 days

Total

15

Last Release

118d ago

PHP version history (7 changes)1.0.0PHP ~5.6|~7.0

1.0.1PHP ~5.6|~7.0|~7.1

1.0.4PHP ~5.6|~7.0|~7.1|~7.2

1.0.7PHP ~5.6|~7.0|~7.1|~7.2|~7.3|~7.4

1.0.10PHP ~5.6|~7.0|~7.1|~7.2|~7.3|~7.4|~8.0

1.0.13PHP ~5.6|~7.0|~7.1|~7.2|~7.3|~7.4|~8.0|~8.1|~8.2|~8.3

1.0.14PHP ~5.6|~7.0|~7.1|~7.2|~7.3|~7.4|~8.0|~8.1|~8.2|~8.3|~8.4|~8.5

### Community

Maintainers

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

---

Top Contributors

[![stijnvanouplines](https://avatars.githubusercontent.com/u/16742744?v=4)](https://github.com/stijnvanouplines "stijnvanouplines (21 commits)")[![joshuadegier](https://avatars.githubusercontent.com/u/2580917?v=4)](https://github.com/joshuadegier "joshuadegier (19 commits)")[![thedejavunl](https://avatars.githubusercontent.com/u/20168770?v=4)](https://github.com/thedejavunl "thedejavunl (5 commits)")[![boyke](https://avatars.githubusercontent.com/u/5636655?v=4)](https://github.com/boyke "boyke (2 commits)")[![edwinvdpol](https://avatars.githubusercontent.com/u/9265514?v=4)](https://github.com/edwinvdpol "edwinvdpol (2 commits)")[![machas1337](https://avatars.githubusercontent.com/u/11176628?v=4)](https://github.com/machas1337 "machas1337 (2 commits)")[![stef007a](https://avatars.githubusercontent.com/u/37042002?v=4)](https://github.com/stef007a "stef007a (1 commits)")[![mhajder](https://avatars.githubusercontent.com/u/6783135?v=4)](https://github.com/mhajder "mhajder (1 commits)")

---

Tags

laraveldirectadminsolitweb

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/solitweb-laravel-directadmin/health.svg)

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

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[riclep/laravel-storyblok

A Laravel wrapper around the Storyblok API to provide a familiar experience for Laravel devs

6277.0k5](/packages/riclep-laravel-storyblok)[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)

PHPackages © 2026

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