HelloSign Laravel
![Total Downloads][ico-downloads]
, (*1)
This package acts as a wrapper, for the HelloSign PHP SDK, to inject the relevant credentials and allow you to use the package in the container. Some examples of usage have been provided below., (*2)
See the HelloSign PHP SDK for full details., (*3)
Take a look at contributing.md to see a to do list., (*4)
Installation
Via Composer, (*5)
``` bash
$ composer require industrious/hellosign-laravel, (*6)
## Usage
Publish the config, and add the relevant API authentication details to your `.env` file.
```bash
php artisan vendor:publish --tag=laravel-hellosign
Examples
Get client account details
/**
* @param HelloSignLaravel\Client $client
*/
public function client(Client $client)
{
$client = $client->getAccount();
...
Send a signature request
/**
* @param HelloSignLaravel\Classes\SignatureRequest $signature_request
*/
public function sign(SignatureRequest $signature_request)
{
$request = $signature_request
->setTitle('Title')
->setSubject('Subject')
->setMessage('Message')
->addSigner('email@address.com', 'Client name');
$file = storage_path('app/file.pdf');
$request->addFile($file);
$response = $request->send();
...
Send a signature request using a pre-defined template
/**
* @param HelloSignLaravel\Classes\SignatureRequest $signature_request
*/
public function templateSign(TemplateSignatureRequest $signature_request)
{
$request = $signature_request
->setTemplateId(config('hellosign.templates.contract'))
->setTitle('Title')
->setSubject('Subject')
->setMessage('Message')
->setSigner('Client', 'email@address.com', 'Test User');
$request->setCustomFieldValue('Name', 'Test User');
$response = $request->send();
...
Change log
Please see the changelog for more information on what has changed recently., (*7)
Testing
bash
$ composer test
, (*8)
Contributing
Please see contributing.md for details and a todolist., (*9)
Security
If you discover any security related issues, please email christian@industrious.agency instead of using the issue tracker., (*10)
Credits
License
MIT. Please see the license file for more information., (*11)