updaterbot/laravel-runcloud-sdk
最新稳定版本:1.0.2
Composer 安装命令:
composer require updaterbot/laravel-runcloud-sdk
包简介
Laravel package wrapper around the runcloud API SDK
README 文档
README
This is a simple laravel package that creates a provider for the SDK developed by onhonvercode here: https://github.com/updaterbot/runcloud-sdk
Installation
Require the package via composer in your laravel app:
composer require updaterbot/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'; } }
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-27