PHP code example of fozbek / coolify-php-sdk
1. Go to this page and download the library: Download fozbek/coolify-php-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/ */
fozbek / coolify-php-sdk example snippets
Configure Bearer authorization: bearerAuth
$config = CoolifyPHP\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new CoolifyPHP\Client\Api\ApplicationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$create_dockercompose_application_request = new \CoolifyPHP\Client\Model\CreateDockercomposeApplicationRequest(); // \CoolifyPHP\Client\Model\CreateDockercomposeApplicationRequest | Application object that needs to be created.
try {
$result = $apiInstance->createDockercomposeApplication($create_dockercompose_application_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ApplicationsApi->createDockercomposeApplication: ', $e->getMessage(), PHP_EOL;
}