PHP code example of quentinbontemps / laravel-yousign

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

    

quentinbontemps / laravel-yousign example snippets


'providers' => [
    .... 
    \QuentinBontemps\LaravelYousign\LaravelYousignServiceProvider::class,
],

use use QuentinBontemps\LaravelYousign\Facades\LaravelYousign;

$client = LaravelYousign::client();
$result = $client->getCosignedFilesFromDemand(array(
    'idDemand' => 523020,
    'token' => '',
    'idFile' => 1128720
));

$dir = __DIR__.'/tmp';
if(!mkdir($dir) && !is_dir($dir, 0775)) {
    throw new \Exception('failed create tmp file');
}

file_put_contents($dir.'/result.pdf', $result->file);
config/app.php
bash
php artisan vendor:publish --tag=laravel_yousign_config