PHP code example of pittacusw / parse-bill

1. Go to this page and download the library: Download pittacusw/parse-bill 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/ */

    

pittacusw / parse-bill example snippets


return [
    'county' => \Pittacusw\ParseBill\Models\County::class,
    'documents_type' => \Pittacusw\ParseBill\Models\DocumentsType::class,
    'additional_tax' => \Pittacusw\ParseBill\Models\AdditionalTax::class,
];

use Pittacusw\ParseBill\ReadXml;

$document = ReadXml::parse($xmlOrPath);

use Pittacusw\ParseBill\ReadXml;

$signature = ReadXml::signature($xmlOrPath);

use Pittacusw\ParseBill\ParsePdf;

$pdf = ParsePdf::render($xmlOrPath);

return $pdf->stream('documento.pdf');

$contents = ParsePdf::render($xmlOrPath)->output();
bash
php artisan vendor:publish --provider="Pittacusw\ParseBill\ParseBillServiceProvider"
php artisan migrate
bash
php artisan db:seed --class="Pittacusw\ParseBill\Seeders\SiiBranchesTableSeeder"
php artisan db:seed --class="Pittacusw\ParseBill\Seeders\CountiesTableSeeder"
php artisan db:seed --class="Pittacusw\ParseBill\Seeders\DocumentsTypesTableSeeder"
php artisan db:seed --class="Pittacusw\ParseBill\Seeders\AdditionalTaxesTableSeeder"