alexis-riot / laravel-yousign
Laravel wrapper for the YouSign API
Installs: 2 104
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 1
Open Issues: 3
Requires
- php: ^7.3|^8.0
- guzzlehttp/guzzle: ^7.0.1
This package is auto-updated.
Last update: 2024-09-08 19:30:50 UTC
README
Installation
You can install the package via composer:
composer require alexis-riot/laravel-yousign
The service provider will automatically register itself.
You must publish the config file with:
php artisan vendor:publish --provider="AlexisRiot\Yousign\YousignServiceProvider" --tag="config"
This is the contents of the config file that will be published at config/yousign.php
:
return [ 'api_key' => env('YOUSIGN_API_KEY', 'production'), // ['production', 'staging'] 'api_env' => env('YOUSIGN_API_ENV'), ];
Usage
Users
Lists all users:
use AlexisRiot\Yousign\Facades\Yousign; $users = Yousign::getUsers();
Procedure
Send a file:
use AlexisRiot\Yousign\Facades\Yousign; $file = Yousign::createFile([ "name" => "devis.pdf", "content" => "JVBERi0xLjUKJb/3ov4KNiA...", ]);
Create a procedure:
The creation of a procedure is fully dynamic, you can add multiple members and multiple files.
use AlexisRiot\Yousign\Facades\Yousign; use AlexisRiot\Yousign\YousignProcedure; $file = Yousign::createFile([ "name" => "devis.pdf", "content" => "JVBERi0xLjUKJb/3ov4KNiA...", ]); $procedure = new YousignProcedure(); $procedure ->withName("My procedure") ->withDescription("The description of my procedure") ->addMember([ 'firstname' => "Alexis", 'lastname' => "Riot", 'email' => "contact@alexisriot.fr", 'phone' => "+33 600000000", ], [$file]) ->send();
License
The MIT License (MIT). Please see License File for more information.