mindfullsilence / laravel-runcloud-sdk
There is no license information available for the latest version (1.0.1) of this package.
Laravel package wrapper around the runcloud API SDK
1.0.1
2019-09-22 20:20 UTC
Requires
- onhover/runcloud-sdk: v1.1.*
Requires (Dev)
- orchestra/testbench: 3.8.x-dev
- phpunit/phpunit: 7.5.x-dev
This package is auto-updated.
Last update: 2025-03-10 11:23:49 UTC
README
This is a simple laravel package that creates a provider for the SDK developed by onhonvercode here: https://github.com/onhovercode/runcloud-sdk
Installation
Require the package via composer in your laravel app:
composer require mindfullsilence/laravel-runcloud-sdk
Publish the package:
php artisan vendor:publish
Select Mindfullsilence\LaravelRuncloudSdk\Providers\RuncloudClientProvider
from the list provided.
Add your api keys to the .env file:
RUNCLOUD_PUBLIC_KEY=your-api-key
RUNCLOUD_SECRET_KEY=your-secret-key
Usage
Once installed, you can access the runcloud class instance using the facade, dependency injection, or the service container:
use \Mindfullsilence\LaravelRuncloudSdk\Clients\RuncloudClient; class SomeClass { public function __construct( RuncloudClient $runcloud ) { $this->runcloud = $runcloud; return $this->runcloud->ping() === 'pong'; } }
use \Mindfullsilence\LaravelRuncloudSdk\Facades\RuncloudClient; class SomeClass { public function index() { return RuncloudClient::ping() === 'pong'; } }
use \Mindfullsilence\LaravelRuncloudSdk\Clients\RuncloudClient; class SomeClass { public function index() { return app(RuncloudClient::class)->ping() === 'pong'; } // or public function index() { return app('runcloud.api')->ping() === 'pong'; } }