PHP code example of dazza-dev / laravel-sri-ec

1. Go to this page and download the library: Download dazza-dev/laravel-sri-ec 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/ */

    

dazza-dev / laravel-sri-ec example snippets


use DazzaDev\LaravelSriEc\Facades\LaravelSriEc;

$client = LaravelSriEc::getClient();

// Usar el valor en inglés de la tabla
$client->setDocumentType('invoice');

// Datos del documento
$client->setDocumentData($documentData);

// Enviar el documento
$document = $client->sendDocument();

use DazzaDev\LaravelSriEc\Facades\LaravelSriEc;

// Obtener los listados disponibles
$listings = LaravelSriEc::getListings();

// Consultar los datos de un listado por tipo
$listingByType = LaravelSriEc::getListing('identification-types');
bash
php artisan vendor:publish --tag="laravel-sri-ec-config"
bash
php artisan vendor:publish --tag="laravel-sri-ec-migrations"
bash
php artisan migrate
bash
php artisan sri-ec:install