This package connects Laravel to the LetterXpress API.
Install this package via Composer:
composer require ctsoft/laravel-letter-xpress
Add the following lines to your .env file and insert your own API credentials:
LETTER_XPRESS_API_USER=[username]
LETTER_XPRESS_API_KEY=[apikey]
If you want to use the sandbox add this line to your .env file:
LETTER_XPRESS_API_URL=https://sandbox.letterxpress.de/v1/
To set a new job:
use CTSoft\Laravel\LetterXpress\Facades\LetterXpress;
use CTSoft\Laravel\LetterXpress\Models\Letter;
$letter = (new Letter())
->setFile('document.pdf') // Use one of this functions
->setDocument('PDF BINARY STRING') // to set the document
->setColor(true)
->setDuplex(true);
...
$letter = LetterXpress::setJob($letter);
echo $letter->getJobId();
echo $letter->getPrice();
...
- Currently only set of a new job is supported
- Feel free to make a PR for additional features or ask for it via an issue
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
This package is open-sourced software licensed under the MIT license.