PHP code example of updaterbot / laravel-runcloud-sdk
1. Go to this page and download the library: Download updaterbot/laravel-runcloud-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
updaterbot / laravel-runcloud-sdk example snippets
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';
}
}
bash
php artisan vendor:publish
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.