1. Go to this page and download the library: Download beziworld/laravel-infakt 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/ */
beziworld / laravel-infakt example snippets
use Beziworld\Infakt\Data\InvoiceRequest;
use Beziworld\Infakt\Data\Service;
use Beziworld\Infakt\Facades\Infakt;
$invoice = Infakt::createInvoice(new InvoiceRequest(
services: [
new Service('Website development', unitNetPrice: 500000, quantity: 1), // amounts in grosze
new Service('Hosting 12 months', grossPrice: 61500, taxSymbol: '23', unit: 'usł.'),
],
clientCompanyName: 'ACME Sp. z o.o.',
clientTaxCode: '5261040828',
clientStreet: 'Prosta',
clientStreetNumber: '1',
clientPostCode: '00-001',
clientCity: 'Warszawa',
paymentDate: now()->addDays(14),
), sendToKsef: true);
$invoice->number; // "1/11/2026"
$invoice->grossPrice; // 676500 (grosze)
Infakt::sendByEmail($invoice->uuid);
$task = Infakt::createInvoiceAsync($request); // returns immediately
// later
$task = Infakt::task($task->reference);
if ($task->isDone()) {
$invoice = Infakt::invoice($task->invoiceUuid);
}