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(2mo 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 2mo 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 1mo ago

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

61

—

FairBetter than 99% of packages

Maintenance93

Actively maintained with recent releases

Popularity27

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

66d 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://www.gravatar.com/avatar/4a5690f03d3f16b5b6c060e87c00ee74124b027cb623fbbb51ab2e6a4e1f328e?d=identicon)[Solitweb](/maintainers/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)")[![edwinvdpol](https://avatars.githubusercontent.com/u/9265514?v=4)](https://github.com/edwinvdpol "edwinvdpol (3 commits)")[![boyke](https://avatars.githubusercontent.com/u/5636655?v=4)](https://github.com/boyke "boyke (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

[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[api-ecosystem-for-laravel/dingo-api

A RESTful API package for the Laravel and Lumen frameworks.

3121.5M10](/packages/api-ecosystem-for-laravel-dingo-api)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[kirschbaum-development/laravel-openapi-validator

Automatic OpenAPI validation for Laravel HTTP tests

581.1M5](/packages/kirschbaum-development-laravel-openapi-validator)

PHPackages © 2026

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