Download the PHP package syntaxevolution/laravel-directadmin without Composer
On this page you can find all versions of the php package syntaxevolution/laravel-directadmin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download syntaxevolution/laravel-directadmin
More information about syntaxevolution/laravel-directadmin
Files in syntaxevolution/laravel-directadmin
Package laravel-directadmin
Short Description Laravel 6 DirectAdmin API wrapper
License MIT
Homepage https://github.com/syntaxevolution/laravel-directadmin
Informations about the package laravel-directadmin
Laravel 6 DirectAdmin API wrapper
Installation
You can install this package via Composer using:
Laravel 6 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
Laravel 6+:
If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php
Optionally, register the facade:
To publish the config file to app/config/laravel-directadmin.php run:
Usage
Import the facade at the top of your file.
Examples
This will return an array of all users currently owned the reseller:
This will return an array of the user's usages:
For more commands check the DirectAdmin API docs.
You have to copy the command without the CMD_API_
.
Magic Methods
It's also possible to make use of magic methods to get the data from the API as shown below:
Arguments are also supported when using a magic method:
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()
.
Credits
- Phi1 'l0rdphi1' Stier
- Joshua de Gier / Pendo
License
The MIT License (MIT). Please see License File for more information.