PHP code example of wefabric / acronis-laravel

1. Go to this page and download the library: Download wefabric/acronis-laravel 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/ */

    

wefabric / acronis-laravel example snippets


    use Wefabric\Acronis\AcronisClient;
    use Wefabric\Acronis\UrlResolver;
    use Wefabric\AcronisLaravel\CachedCredentials;

    $credentials = CachedCredentials::make(config('acronis.client_id'), config('acronis.client_secret'));
    $urlResolver = new UrlResolver(config('acronis.domain_url'));

    $acronis = new AcronisClient($urlResolver, $credentials);
    $alertsResponse = $acronis->getClient()->get('/api/alert_manager/v1/alerts');

    $alertsResponse->json();
bash
php artisan vendor:publish --provider="Wefabric\AcronisLaravel\Providers\AcronisLaravelServiceProvider"