An open API service indexing awesome lists of open source software.

https://github.com/sensson/laravel-directadmin

A simple DirectAdmin API for Laravel.
https://github.com/sensson/laravel-directadmin

directadmin laravel

Last synced: 12 months ago
JSON representation

A simple DirectAdmin API for Laravel.

Awesome Lists containing this project

README

          

# DirectAdmin integration for Laravel

[![Latest Version on Packagist](https://img.shields.io/packagist/v/sensson/laravel-directadmin.svg?style=flat-square)](https://packagist.org/packages/sensson/laravel-directadmin)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/sensson/laravel-directadmin/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/sensson/laravel-directadmin/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/sensson/laravel-directadmin/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/sensson/laravel-directadmin/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/sensson/laravel-directadmin.svg?style=flat-square)](https://packagist.org/packages/sensson/laravel-directadmin)

PHP library for interacting with the DirectAdmin API in Laravel.

## Installation

You can install the package via composer:

```bash
composer require sensson/laravel-directadmin
php artisan vendor:publish --tag="laravel-directadmin-config"
```

## Usage

You will need the following credentials to authenticate:

- `DIRECTADMIN_SERVER`
- `DIRECTADMIN_USERNAME`
- `DIRECTADMIN_PASSWORD`

### A simple example

You can call any DirectAdmin API by using the `DirectAdmin` facade:

```php
post('{DIRECTADMIN_API_CALL}');
```

This will run the `DIRECTADMIN_API_CALL` as the user `user`.

### Debugging

You can enable debugging by calling the `debug` method:

```php
$result = DirectAdmin::debug()->post('{DIRECTADMIN_API_CALL}', []);
```

This will enable debugging for the HTTP request. This can help you identify
issues with the DirectAdmin server.

### More information

For more information on the available commands, please refer to the
[DirectAdmin API documentation](https://docs.directadmin.com/directadmin/customizing-workflow/api-all-about.html).

## Testing

```bash
composer test
```

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## Security Vulnerabilities

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

## Credits

- [Sensson](https://github.com/Sensson)
- [All Contributors](../../contributors)

## License

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