PHPackages                             juststeveking/laravel-envoyer-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. juststeveking/laravel-envoyer-sdk

ActiveLibrary

juststeveking/laravel-envoyer-sdk
=================================

A simple to use PHP class to work with the Laravel Envoyer API

v2.0.0(3y ago)3958.8k↑66.7%17[2 PRs](https://github.com/JustSteveKing/laravel-envoyer-sdk/pulls)MITPHPPHP ^7.4|^8.0

Since Nov 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/JustSteveKing/laravel-envoyer-sdk)[ Packagist](https://packagist.org/packages/juststeveking/laravel-envoyer-sdk)[ GitHub Sponsors](https://github.com/JustSteveKing)[ RSS](/packages/juststeveking-laravel-envoyer-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (10)Versions (7)Used By (0)

Laravel Envoyer SDK
===================

[](#laravel-envoyer-sdk)

[![](./laravel-envoyer-sdk.png)](./laravel-envoyer-sdk.png)

[![Latest Version](https://camo.githubusercontent.com/9588abfc5b78c55b71f985f41eec4202d6f4adc13a66daa79e7baebb63cf6af5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a75737473746576656b696e672f6c61726176656c2d656e766f7965722d73646b2e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://packagist.org/packages/juststeveking/laravel-envoyer-sdk)[![PHP Version](https://camo.githubusercontent.com/e7db107642299036e51460c04bf312f1e177a6784106d336c602b99d94d3f78b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a75737473746576656b696e672f6c61726176656c2d656e766f7965722d73646b2e7376673f7374796c653d666c61742d737175617265)](https://php.net)[![tests](https://github.com/JustSteveKing/laravel-envoyer-sdk/workflows/tests/badge.svg)](https://github.com/JustSteveKing/laravel-envoyer-sdk/workflows/tests/badge.svg)[![Check & fix styling](https://github.com/JustSteveKing/laravel-envoyer-sdk/workflows/Code%20style/badge.svg)](https://github.com/JustSteveKing/laravel-envoyer-sdk/workflows/Code%20style/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/b3ca2486ea127052f5cb69ddc853acdf367a1996b7ac8370d32034db30c8cdd6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a75737473746576656b696e672f6c61726176656c2d656e766f7965722d73646b2e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d6d656469756d76696f6c6574726564)](https://packagist.org/packages/juststeveking/laravel-envoyer-sdk)

A simple to use PHP class to work with the Laravel Envoyer API

Requirements
------------

[](#requirements)

- PHP ^7.4
- PHP ext-json

Installation
------------

[](#installation)

The preferred method of installation is to use composer:

```
$ composer require juststeveking/laravel-envoyer-sdk
```

To work with this package, firstly you **must** have a [Laravel Envoyer](https://envoyer.io/) account, and secondly you must create an API token through [Laravel Envoyer](https://envoyer.io/) itself.

Usage
-----

[](#usage)

You create a simple SDK like so:

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);
```

Once you have `$envoyer` set up, you can now start to work with the resources through the API:

Managing Projects
-----------------

[](#managing-projects)

The simple way to manage envoyer projects through the SDK:

### List all Projects

[](#list-all-projects)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->projects->all();
```

### Create a new Project

[](#create-a-new-project)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->projects->save([
    'name' => 'SDK test',
    'provider' => 'github', // bitbucket, github, gitlab, gitlab-self
    'type' => 'laravel-5', // laravel-5. laravel-4, other
    'repository' => 'laravel/laravel',
    'branch' => 'master'
]);
```

### Fetch a Specific Project

[](#fetch-a-specific-project)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->projects->find('id-of-project');
```

### Modify a Project

[](#modify-a-project)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->projects->modify('id-of-project', [
    'name' => 'Project name update through SDK',
]);
```

### Deleting a Project

[](#deleting-a-project)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->projects->delete('id-of-project');
```

### Update a Project's Source

[](#update-a-projects-source)

Note that all the options are required, you cannot just parse through push\_to\_deploy as a single option

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->projects->updateSource('id-of-project', [
    'provider' => 'github',
    'repository' => 'laravel/laravel',
    'branch' => '8.x',
    'push_to_deploy' => true,
]);
```

Managing Servers
----------------

[](#managing-servers)

The simple way to manage envoyer servers through the SDK:

### List all Servers for a Project

[](#list-all-servers-for-a-project)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->servers->on('id-of-project')->all();
```

### Create a new Server for a Project

[](#create-a-new-server-for-a-project)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->servers->on('id-of-project')->create([
    'name' => 'Server Name',
    'connectAs' => 'forge',
    'host' => 'ip-address-here',
    'phpVersion' => 'php80' // php80, php74, php73, php72, php71, php70, php56
]);
```

### Fetch a single Server for a Project

[](#fetch-a-single-server-for-a-project)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->servers->on('id-of-project')->first('id-of-your-server');
```

### Modify a Server

[](#modify-a-server)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->servers->on('id-of-project')->modify('id-of-your-server', [
    'name' => 'SDK Server'
]);
```

### Delete a Server

[](#delete-a-server)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->servers->on('id-of-project')->remove('id-of-your-server');
```

Managing Environments on a Project
----------------------------------

[](#managing-environments-on-a-project)

The simple way to manage project environments through the SDK:

### Get current environment

[](#get-current-environment)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->environments->on('id-of-project')->key('1234')->all();
```

### Get environment servers

[](#get-environment-servers)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->environments->on('id-of-project')->key('1234')->servers();
```

### Updating project environments

[](#updating-project-environments)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->environments->on('id-of-project')
    ->key('1234')->onServer(1, 2, 3)
    ->put('test=api', 'another=value')
```

### Resetting environment key

[](#resetting-environment-key)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->environments->on('id-of-project')->key('new-env-key')->reset('new-key');
```

Listing available actions from Envoyer
--------------------------------------

[](#listing-available-actions-from-envoyer)

### Get all Actions

[](#get-all-actions)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->actions->all();
```

Managing Action Hooks for a Project
-----------------------------------

[](#managing-action-hooks-for-a-project)

The simple way to manage action hooks for a project through the SDK:

### List all Hooks

[](#list-all-hooks)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->hooks->on('id-of-project')->all();
```

### Create a new Hook

[](#create-a-new-hook)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->hooks->on('id-of-project')->create([
    'name' => 'list',
    'script' => 'll',
    'runAs' => 'forge',
    'actionId' => 'id-of-action',
    'timing' => 'after',
    'servers' => ['id-of-server', 'another-id-of-a-server']
]);
```

### Get a single Hook

[](#get-a-single-hook)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->hooks->on('id-of-project')->first('id-of-hook');
```

### Updating a Hook

[](#updating-a-hook)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->hooks->on('id-of-project')->modify('id-of-hook', [
    'name' => 'list files and directories'
]);
```

### Deleting a Hook

[](#deleting-a-hook)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->hooks->on('id-of-project')->remove('id-of-hook');
```

Managing Deployments
--------------------

[](#managing-deployments)

The simple way to manage project deployments through the SDK:

### List all Deployments

[](#list-all-deployments)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->deployments->on('id-of-project')->all();
```

### Pushing a new Deployment

[](#pushing-a-new-deployment)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

// Default Deployment
$envoyer->deployments->on('id-of-project')->deploy();

// Deployment from branch
$envoyer->deployments->on('id-of-project')->deploy([
    'from' => 'branch',
    'branch' => 'develop'
]);

// Deployment from tag
$envoyer->deployments->on('id-of-project')->deploy([
    'from' => 'tag',
    'tag' => 'v2.0.0'
]);
```

### Getting a single Deployment

[](#getting-a-single-deployment)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->deployments->on('id-of-project')->first('id-of-deployment');
```

### Cancel a Deployment

[](#cancel-a-deployment)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->deployments->on('id-of-project')->cancel('id-of-deployment');
```

Managing Collaborators
----------------------

[](#managing-collaborators)

The simple way to manage project collaborators through the SDK

### List all Collaborators

[](#list-all-collaborators)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->collaborators->on('id-of-project')->all();
```

### Invite a new Collaborator

[](#invite-a-new-collaborator)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->collaborators->on('id-of-project')->invite([
    'email' => 'test@email.com'
]);
```

### Get a single Collaborator

[](#get-a-single-collaborator)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->collaborators->on('id-of-project')->first('id-of-collaborator');
```

### Remove a Collaborator

[](#remove-a-collaborator)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->collaborators->on('id-of-project')->remove('id-of-collaborator');
```

Managing Notifications
----------------------

[](#managing-notifications)

The simple way to manage project notifications through the SDK:

### List all Notifications

[](#list-all-notifications)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->notifications->on('id-of-project')->all();
```

### Create a new Notification

[](#create-a-new-notification)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

// Create an Email Notification
$envoyer->notifications->on('id-of-project')->create([
    'name' => 'Notification Name',
    'type' => 'email', // email, discord, slack, teams
    'email_address' => 'test@email.com'
]);

// Create a Discord Notification
$envoyer->notifications->on('id-of-project')->create([
    'name' => 'Notification Name',
    'type' => 'discord', // email, discord, slack, teams
    'discord_webhook' => 'url-of-webhook'
]);

// Create a Slack Notification
$envoyer->notifications->on('id-of-project')->create([
    'name' => 'Notification Name',
    'type' => 'slack', // email, discord, slack, teams
    'slack_webhook' => 'url-of-webhook'
]);

// Create a Teams Notification
$envoyer->notifications->on('id-of-project')->create([
    'name' => 'Notification Name',
    'type' => 'teams', // email, discord, slack, teams
    'teams_webhook' => 'url-of-webhook'
]);
```

### Get a single Notification

[](#get-a-single-notification)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->notifications->on('id-of-project')->first('id-of-notification');
```

### Modify a Notification

[](#modify-a-notification)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->notifications->on('id-of-project')->modify('id-of-notification', [
    'name' => 'Send Someone an email',
    'type' => 'email',
    'email_address' => 'test@email.com'
]);
```

### Remove a Notification

[](#remove-a-notification)

```
use JustSteveKing\Laravel\Envoyer\SDK\Envoyer;

$envoyer = Envoyer::illuminate(
    API_TOKEN_HERE,
    'https://envoyer.io/' // this is optional as is the default
);

$envoyer->notifications->on('id-of-project')->remove('id-of-notification');
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 88.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~114 days

Recently: every ~140 days

Total

6

Last Release

1449d ago

Major Versions

v1.4.0 → v2.0.02022-05-31

PHP version history (2 changes)v1.0.0PHP ^7.4

v2.0.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a87fe82b349821ebd49cf57d65c4cd3e33ae0833222a8438d90fe8921ca899ea?d=identicon)[JustSteveKing](/maintainers/JustSteveKing)

---

Top Contributors

[![JustSteveKing](https://avatars.githubusercontent.com/u/6368379?v=4)](https://github.com/JustSteveKing "JustSteveKing (23 commits)")[![JohnRoux](https://avatars.githubusercontent.com/u/4610241?v=4)](https://github.com/JohnRoux "JohnRoux (2 commits)")[![tpavlek](https://avatars.githubusercontent.com/u/782576?v=4)](https://github.com/tpavlek "tpavlek (1 commits)")

---

Tags

laravelsdkenvoyer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/juststeveking-laravel-envoyer-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/juststeveking-laravel-envoyer-sdk/health.svg)](https://phpackages.com/packages/juststeveking-laravel-envoyer-sdk)
```

###  Alternatives

[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k35.6M75](/packages/aws-aws-sdk-php-laravel)[octw/aramex

A Library to integrate with Aramex APIs

2925.2k](/packages/octw-aramex)[wxm/pdd-sdk

拼多多 SDK 封装, 调用简单、语义化增强。支持 Laravel/Lumen。

154.7k](/packages/wxm-pdd-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
