Download the PHP package laravel/forge-sdk without Composer

On this page you can find all versions of the php package laravel/forge-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 forge-sdk

Laravel Forge SDK

Build Status Total Downloads Latest Stable Version License

Introduction

The Laravel Forge SDK provides an expressive interface for interacting with Forge's API and managing Laravel Forge servers.

Official Documentation

Installation

To install the SDK in your project you need to require the package via composer:

Upgrading

When upgrading to a new major version of Forge SDK, it's important that you carefully review the upgrade guide.

Basic Usage

You can create an instance of the SDK like so:

Using the Forge instance you may perform multiple actions as well as retrieve the different resources Forge's API provides:

This will give you an array of servers that you have access to, where each server is represented by an instance of Laravel\Forge\Resources\Server, this instance has multiple public properties like $name, $id, $size, $region, and others.

You may also retrieve a single server using:

On multiple actions supported by this SDK you may need to pass some parameters, for example when creating a new server:

These parameters will be used in the POST request sent to Forge servers, you can find more information about the parameters needed for each action on Forge's official API documentation.

Notice that this request for example will only start the server creation process, your server might need a few minutes before it completes provisioning, you'll need to check the server's $isReady property to know if it's ready or not yet.

Some SDK methods however wait for the action to complete on Forge's end, we do this by periodically contacting Forge servers and checking if our action has completed, for example:

This method will ping Forge servers every 5 seconds and see if the newly created Site's status is installed and only return when it's so, in case the waiting exceeded 30 seconds a Laravel\Forge\Exceptions\TimeoutException will be thrown.

You can easily stop this behaviour by setting the $wait argument to false:

You can also set the desired timeout value:

Authenticated User

Managing Servers

On a Server instance you may also call:

Server SSH Keys

On a SSHKey instance you may also call:

Server Scheduled Jobs

On a Job instance you may also call:

Server Events

Managing Services

Server Daemons

On a Daemon instance you may also call:

Server Firewall Rules

On a FirewallRule instance you may also call:

Managing Sites

On a Site instance you may also call:

Site Workers

On a Worker instance you may also call:

Security Rules

On a SecurityRule instance you may also call:

Site Webhooks

On a Webhook instance you may also call:

Site Commands

Site SSL Certificates

On a Certificate instance you may also call:

Nginx Templates

On a NginxTemplate instance you may also call:

Managing Databases

On a Database instance you may also call:

On a DatabaseUser instance you may also call:

Managing Recipes

On a Recipe instance you may also call:

Managing Backups

On a BackupConfiguration instance you may also call:

On a Backup instance you may also call:

Managing Redirects

On a RedirectRule instance you may also call:

Contributing

Thank you for considering contributing to Forge SDK! You can read the contribution guide here.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

Laravel Forge SDK is open-sourced software licensed under the MIT license.


All versions of forge-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.0
ext-json Version *
guzzlehttp/guzzle Version ^6.3.1|^7.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 laravel/forge-sdk contains the following files

Loading the files please wait ....