PHP code example of ctsoft / laravel-letter-xpress

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

    

ctsoft / laravel-letter-xpress example snippets


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();
...