steveworley / lagoon-php-sdk
Lagoon GraphQL SDK for PHP
v1.5.0
2020-05-05 23:43 UTC
Requires
- php: >=7
- euautomation/graphql-client: ^0.2.0
Requires (Dev)
- couscous/couscous: ^1.7
- phpunit/phpunit: ^7.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-08-29 02:37:29 UTC
README
The Lagoon SDK for PHP makes it easy for developers to connect their applications to the Lagoon GraphQL service in PHP Code.
Getting started
Require the package using compsoer.
composer require steveworley/lagoon-php-sdk
Define the $endpoint and $token to create a new client instance.
Quick Examples
Fetch all projects
<?php use Lagoon\LagoonClient; $client = new LagoonClient($endpoint, $token); $customers = $client->customer()->all()->execute();
Fetch all project names
<?php use Lagoon\LagoonClient; $client = new LagoonClient($endpoint, $token); $customers = $client->project()->all()->fields(['name'])->execute();
Add a project
<?php use Lagoon\LagoonClient; $client = new LagoonClient($endpoint, $token); $project = [ 'name' => 'my-proejct', 'customer' => 1, 'openshift' => 1, 'gitUrl' => 'git@github.com:test/test.git' 'productEnvironment' => 'master', 'branches' => 'master', ]; $customers = $client->project()->add($project)->execute();