Download the PHP package augusl/zenlayercloud-laravel-sdk without Composer

On this page you can find all versions of the php package augusl/zenlayercloud-laravel-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zenlayercloud-laravel-sdk

Zenlayer Cloud Laravel SDK

tests PHP Laravel

中文文档 · English

Unofficial, community-maintained SDK. This package is not affiliated with or endorsed by Zenlayer Inc. It is maintained against the public Zenlayer Cloud OpenAPI documentation and Apache-licensed official Go/Python SDK sources; exact audited revisions are disclosed in UPSTREAM.md. Bug reports and feature requests belong here; Zenlayer Cloud product questions belong on the official documentation site.

A first-class Laravel package for talking to Zenlayer Cloud OpenAPI services. Designed to feel native — service providers, facades, configurable connections, the standard Illuminate\Http\Client for transport, and Http::fake() support out of the box.

The package currently covers these Compute and Networking services:

The generated surface contains 324 Actions and 1,130 model classes in total. Its upstream source and known documentation differences are recorded in UPSTREAM.md.

The official SDKs now deprecate all 12 IPT Actions in favor of SDN Internet. This package preserves the legacy IPT methods and routes; it does not silently redirect them or add an SDN client. See the migration notes.

Every Action in the supported services is exposed as a typed PHP method backed by typed Request and Response model classes, so IDEs autocomplete the entire surface area.

When upgrading to this snapshot, update IPT references from RemoteIptAvailableRoutingType to the official IPTransitAvailableRoutingType. For ZEC VPCs, cidrBlock now represents the primary CIDR only; secondaryCidrBlocks contains secondary CIDRs. Add/remove secondary CIDRs with AssociateVpcCidrBlock / UnassociateVpcCidrBlock, rather than passing a comma-separated list to ModifyVpcAttribute. See UPSTREAM.md.


Requirements

Component Version
PHP ^8.2
Platform 64-bit
Composer 2.x
Laravel 11.x · 12.x · 13.x
ext-json enabled (default)
ext-hash enabled (default)

The 64-bit requirement is intentional: the official VM/IPT/ZEC schemas contain signed int64 counters and limits that a 32-bit PHP integer cannot represent.

Framework/PHP combinations follow Laravel's official support policy: Laravel 11 on PHP 8.2–8.4, Laravel 12 on PHP 8.2–8.5, and Laravel 13 on PHP 8.3–8.5.

Laravel 11 remains compatibility-tested for existing applications, but its upstream security-fix window has ended. New production deployments should use a currently supported Laravel release.

Installation

Publish the configuration file:

Set credentials in your .env. Either an AccessKey pair (HMAC signing):

For STS, use the temporary AccessKey pair and also set:

If configuration was already published, add the security_token entry shown below to the selected connection. Obtain and renew STS credentials outside this package, then recreate or flush cached clients when replacing them.

…or a personal access token (Bearer auth — takes precedence when set, generate one at https://console.zenlayer.com/accessToken):

The package supports Laravel's auto-discovery — the service provider and the ZenlayerCloud facade are registered for you.


Quick start

Resolve clients

There are three equivalent ways to obtain a client:

List availability zones

Create a virtual machine

CreateInstances creates billable resources. Replace every placeholder with identifiers from your own account before running it.

IP Transit (IPT)

Elastic Compute (ZEC)

Error handling

The SDK wraps request serialization, connection, API, and response parsing failures in ZenlayerCloudSdkException:

The exception exposes $e->errorCode (e.g. INVALID_PARAMETER, NETWORK_ERROR, REQUEST_LIMIT_EXCEEDED, SECURITY_CHALLENGE, REQUEST_BLOCKED, SDK_INVALID_REQUEST, CREDENTIAL_VALUE_MISSING, CONFIG_INVALID) and $e->requestId for log correlation. The raw API/SDK message is available as $e->errorMessage or $e->getErrorMessage(); $e->getMessage() includes the formatted code and request id. Transport-level failures (DNS, connection refused, TLS, timeout) are wrapped with code NETWORK_ERROR; you never need to catch Laravel's ConnectionException separately.

Exceptions from application-supplied middleware or invalid transport resources (such as a missing CA file) retain their original types.

A successful batch response can still contain item-level failures. For example, DeleteIpv6Addresses returns failed items in $response->response?->failedIpv6Addresses; inspect that list even when no exception is thrown. The SDK preserves the result without retrying the batch.

There are two deliberately separate retry policies:


Configuration

The published config/zenlayercloud.php file follows Laravel's "connection" convention used by the database, cache, and mail components:

endpoint accepts only host[:port] or a complete http(s)://host[:port] URL; credentials, paths, queries, fragments, and unsupported schemes fail fast. debug writes only method, URL, service, Action, and status to Laravel's PSR-3 logger—Authorization headers and request/response bodies are never logged.

Switch between connections with the optional argument to the manager:


Testing the SDK in your app

The transport layer is built on Illuminate\Http\Client, so Laravel's built-in Http::fake() is the only thing you need to mock the API:


Conventions


Local development

See CONTRIBUTING.md for the full contributor workflow.


Roadmap

The current release line covers VM + IPT + ZEC. Other Zenlayer Cloud product groups (BMC, CCS, Traffic, ZDNS, ZGA, ZLB, ZLS, ZOS, ZRM, etc.) are deferred to subsequent minor versions; contributions are welcome.

Security

Found a vulnerability? Please follow the responsible-disclosure process described in SECURITY.md — do not file a public issue.

License

Apache-2.0 — see NOTICE.

Disclaimer

This is an unofficial, community-maintained Laravel SDK. It is provided as-is, with no affiliation with, sponsorship from, or endorsement by Zenlayer Inc. or any of its subsidiaries. "Zenlayer" and "Zenlayer Cloud" are trademarks of their respective owners; this project uses those names solely to describe the upstream service it integrates with.


All versions of zenlayercloud-laravel-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
php-64bit Version *
composer-runtime-api Version ^2.0
ext-json Version *
ext-hash Version *
illuminate/support Version ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^11.0 || ^12.0 || ^13.0
illuminate/contracts Version ^11.0 || ^12.0 || ^13.0
psr/log Version ^1.1 || ^2.0 || ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package augusl/zenlayercloud-laravel-sdk contains the following files

Loading the files please wait ...