Download the PHP package teaminfinitylk/laravel-hestiacp-sdk without Composer
On this page you can find all versions of the php package teaminfinitylk/laravel-hestiacp-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download teaminfinitylk/laravel-hestiacp-sdk
More information about teaminfinitylk/laravel-hestiacp-sdk
Files in teaminfinitylk/laravel-hestiacp-sdk
Package laravel-hestiacp-sdk
Short Description A modern, Laravel SDK for the HestiaCP Control Panel API
License MIT
Informations about the package laravel-hestiacp-sdk
Laravel HestiaCP SDK
A modern, fully-typed Laravel SDK for the HestiaCP Control Panel API.
Installation
Configuration
Publish the config file:
Add to your .env:
Note: HestiaCP's modern auth uses an access key pair in the format
ACCESS_KEY_ID:SECRET_ACCESS_KEY.
Generate one from Admin → Access Keys in your HestiaCP panel.
Quick Start
Using the Facade
Using Dependency Injection
Manual / Standalone Usage
Resources
All resources are accessed via the client. Methods that operate on user data require $username as the first argument.
Users — users()
Web Domains — web()
Mail Domains & Accounts — mail()
Databases — databases()
HestiaCP automatically prefixes database and DB user names with the owner's username.
e.g. userjohn+ databaseblog→ stored asjohn_blog.
DNS — dns()
Cron Jobs — cron()
Backups — backups()
Firewall — firewall()
IP Addresses — ips()
System-level IPs. Requires admin privileges.
Packages — packages()
DTOs
Typed Data Transfer Objects are returned by list() calls:
| DTO | Returned by |
|---|---|
UserDto |
users()->list() |
WebDomainDto |
web()->list() |
MailDomainDto |
mail()->list() |
DatabaseDto |
databases()->list() |
DnsRecordDto |
dns()->listRecords() |
Exception Handling
HestiaCP Return Codes
| Code | Name | Meaning |
|---|---|---|
| 0 | OK | Success |
| 1 | E_ARGS | Missing or invalid arguments |
| 2 | E_INVALID | Invalid object value |
| 3 | E_NOTEXIST | Object does not exist |
| 4 | E_EXISTS | Object already exists |
| 5 | E_SUSPENDED | Object is suspended |
| 6 | E_UNSUSPENDED | Object is not suspended |
| 7 | E_INUSE | Object is in use |
| 8 | E_LIMIT | Resource limit reached |
| 9 | E_PASSWORD | Invalid password |
| 10 | E_FORBIDDEN | Command not permitted |
| 11 | E_DISABLED | Feature disabled |
| 15 | E_CONNECT | Connection error |
| 17 | E_DB | Database error |
Billing Automation Example
A common billing integration pattern — create a full hosting account:
Testing
Requirements
- PHP ^8.2
- cURL extension enabled
- HestiaCP server (any recent version)
License
MIT © TeamInfinity PVT LTD