1. Go to this page and download the library: Download medeirosdev/arquivei-nfe 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/ */
$arquivei = new Arquivei;
$arquivei->setLicense($license);
// or Laravel framework license is auto generated
$request = new Arquivei;
$page = 0;
$response = (new Arquivei)
->setLicense($license)
->request($page);
// Get data with list NFe
$response->data
// Or key access_key for first NFe
$response->data[0]->access_key
$response = (new Arquivei)->request();
$arquivei = new Arquivei;
$response = $arquivei->request();
// Example Store implementing StoreInterface
class MyStore implements StoreInterface {
public function store (XmlParser $nfe): bool
{
Storage::disk('local')->put($nfe->accessKey . '.xml', $nfe->xml);
return true;
}
}