{"id":19235240,"url":"https://github.com/sensson/laravel-directadmin","last_synced_at":"2025-02-28T11:23:44.043Z","repository":{"id":242382066,"uuid":"808588606","full_name":"sensson/laravel-directadmin","owner":"sensson","description":"A simple DirectAdmin API for Laravel.","archived":false,"fork":false,"pushed_at":"2025-02-24T16:18:08.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-24T16:52:21.491Z","etag":null,"topics":["directadmin","laravel"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sensson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Sensson"}},"created_at":"2024-05-31T11:35:23.000Z","updated_at":"2025-02-03T17:01:03.000Z","dependencies_parsed_at":"2024-06-14T10:27:56.930Z","dependency_job_id":"a5d437d1-3dea-423c-b807-ce7bb1f7b9bd","html_url":"https://github.com/sensson/laravel-directadmin","commit_stats":null,"previous_names":["sensson/laravel-directadmin"],"tags_count":3,"template":false,"template_full_name":"spatie/package-skeleton-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensson%2Flaravel-directadmin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensson%2Flaravel-directadmin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensson%2Flaravel-directadmin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensson%2Flaravel-directadmin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sensson","download_url":"https://codeload.github.com/sensson/laravel-directadmin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241143684,"owners_count":19917204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["directadmin","laravel"],"created_at":"2024-11-09T16:16:22.004Z","updated_at":"2025-02-28T11:23:44.006Z","avatar_url":"https://github.com/sensson.png","language":"PHP","funding_links":["https://github.com/sponsors/Sensson"],"categories":[],"sub_categories":[],"readme":"# DirectAdmin integration for Laravel\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/sensson/laravel-directadmin.svg?style=flat-square)](https://packagist.org/packages/sensson/laravel-directadmin)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/sensson/laravel-directadmin/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/sensson/laravel-directadmin/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/sensson/laravel-directadmin/fix-php-code-style-issues.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/sensson/laravel-directadmin/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/sensson/laravel-directadmin.svg?style=flat-square)](https://packagist.org/packages/sensson/laravel-directadmin)\n\nPHP library for interacting with the DirectAdmin API in Laravel.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require sensson/laravel-directadmin\nphp artisan vendor:publish --tag=\"laravel-directadmin-config\"\n```\n\n## Usage\n\nYou will need the following credentials to authenticate:\n\n- `DIRECTADMIN_SERVER`\n- `DIRECTADMIN_USERNAME`\n- `DIRECTADMIN_PASSWORD`\n\n### A simple example\n\nYou can call any DirectAdmin API by using the `DirectAdmin` facade:\n\n```php\n\u003c?php\nuse Sensson\\DirectAdmin\\Facades\\DirectAdmin;\n\n$result = DirectAdmin::post('{DIRECTADMIN_API_CALL}', []);\n$result = DirectAdmin::get('{DIRECTADMIN_API_CALL}', []);\n```\n\nThe first parameter is the API command you want to call. The second parameter\nis an array of parameters that will be passed to the API as well. This is\noptional and by default an empty array is used.\n\nYou can use the `post` or `get` method to call the API.\n\n### JSON API\n\nWe also support the new JSON API. For example, to get the admin usage, you can\nuse the following command:\n\n```php\n$result = DirectAdmin::get('api/admin-usage', []);\n```\n\n### Impersonation\n\nIf you want to run an API call as a different user, and you are authenticated as \nan admin or reseller, you can use the `become` method:\n\n```php\n$result = DirectAdmin::become('user')-\u003epost('{DIRECTADMIN_API_CALL}');\n```\n\nThis will run the `DIRECTADMIN_API_CALL` as the user `user`.\n\n### Debugging\n\nYou can enable debugging by calling the `debug` method:\n\n```php\n$result = DirectAdmin::debug()-\u003epost('{DIRECTADMIN_API_CALL}', []);\n```\n\nThis will enable debugging for the HTTP request. This can help you identify\nissues with the DirectAdmin server.\n\n### More information\n\nFor more information on the available commands, please refer to the \n[DirectAdmin API documentation](https://docs.directadmin.com/directadmin/customizing-workflow/api-all-about.html).\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Sensson](https://github.com/Sensson)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensson%2Flaravel-directadmin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsensson%2Flaravel-directadmin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensson%2Flaravel-directadmin/lists"}