PHPackages                             simplepark-bv/laravel-invoices - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. simplepark-bv/laravel-invoices

ActiveLibrary[Payment Processing](/categories/payments)

simplepark-bv/laravel-invoices
==============================

Generate professional PDF invoices for Laravel applications

v2.1.4(3mo ago)11.4k↓33.9%[1 issues](https://github.com/SimplePark-BV/laravel-invoices/issues)MITPHPPHP ^8.2

Since Jan 11Pushed 3mo agoCompare

[ Source](https://github.com/SimplePark-BV/laravel-invoices)[ Packagist](https://packagist.org/packages/simplepark-bv/laravel-invoices)[ Docs](https://github.com/simplepark-bv/laravel-invoices)[ RSS](/packages/simplepark-bv-laravel-invoices/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (21)Used By (0)

 [   ![Laravel Invoices Banner](https://camo.githubusercontent.com/ac64ec61e6e6bddcb0b1cf4d65db850a632a619363eeedd707a30d5fc20312f0/68747470733a2f2f7777772e73696d706c657061726b2e6e6c2f696d616765732f6769746875622f6c61726176656c2d696e766f696365732d62616e6e65722d6c696768742e706e67)  ](https://simplepark.nl)Laravel Invoices
================

[](#laravel-invoices)

A Laravel package for generating Invoice and Usage Receipt PDFs with customizable templates and multilingual support.

Installation
------------

[](#installation)

```
composer require simplepark-bv/laravel-invoices
```

### Publish Configuration

[](#publish-configuration)

```
php artisan vendor:publish --provider="SimpleParkBv\Invoices\InvoiceServiceProvider" --tag="invoices-config"
```

Customize currency, tax rates, payment terms, PDF settings, and seller information in `config/invoices.php`.

### Publish Translations

[](#publish-translations)

```
php artisan vendor:publish --provider="SimpleParkBv\Invoices\InvoiceServiceProvider" --tag="invoices-lang"
```

Modify labels, table headers, footer text, and filename prefixes in `lang/vendor/invoices/`. Available languages: `en`, `nl`.

Usage
-----

[](#usage)

### Invoices

[](#invoices)

```
use SimpleParkBv\Invoices\Models\Invoice;
use SimpleParkBv\Invoices\Models\InvoiceItem;
use SimpleParkBv\Invoices\Models\Buyer;

$invoice = Invoice::make()
    ->series('2024')
    ->sequence(1)
    ->date('2024-01-15')
    ->language('nl')
    ->buyer([
        'name' => 'John Doe',
        'email' => 'john@example.com',
        'address' => '123 Main St',
        'city' => 'Amsterdam',
        'postal_code' => '1000 AA',
    ])
    ->items([
        InvoiceItem::make([
            'title' => 'Product Name',
            'description' => 'Product description',
            'quantity' => 2,
            'unit_price' => 50.00,
            'tax_percentage' => 21.0,
        ]),
    ]);

return $invoice->download(); // or ->stream() for browser preview
```

**Invoice Numbers**: Combine `series()` and `sequence()` to generate formatted invoice numbers (e.g., "2024.00000123").

**Discounts**: Use negative `unit_price` values for discount items (quantities must be positive).

**Expected Totals**: Set an expected total with `expectedTotal(100.00)` for validation. When the invoice is rendered, if the expected total differs from the calculated total, an error will be logged.

### Usage Receipts

[](#usage-receipts)

```
use SimpleParkBv\Invoices\Models\UsageReceipt;
use SimpleParkBv\Invoices\Models\UsageReceiptItem;
use SimpleParkBv\Invoices\Models\Buyer;

$receipt = UsageReceipt::make()
    ->date('2024-01-15')
    ->language('nl')
    ->title('Custom Title') // optional, falls back to translation
    ->documentId('DOC-12345')
    ->userId('USER-001')
    ->buyer([
        'name' => 'John Doe',
        'email' => 'john@example.com',
    ])
    ->items([
        UsageReceiptItem::make([
            'user' => 'John Doe',
            'identifier' => 'ABC123',
            'start_date' => '2024-01-15 10:00:00',
            'end_date' => '2024-01-15 12:00:00',
            'category' => 'Premium',
            'price' => 12.50,
        ]),
    ])
    ->note('Optional note for the receipt');

return $receipt->download(); // filename is locale-aware
```

**Locale-Aware Filenames**: The package generates filenames based on the selected language (e.g., `gebruiksbevestiging-2026-01-19-14-30-00.pdf` for Dutch).

### Common Features

[](#common-features)

Both `Invoice` and `UsageReceipt` support:

- **Fluent interface** and **array-based** creation
- **Data arrays**: `Invoice::make($data)` or `UsageReceipt::make($data)`
- **Serialization**: `->toArray()` for JSON/API responses
- **Validation**: Automatic validation before rendering, or manual with `->validate()`
- **Output**: `->download(?string $filename)` or `->stream(?string $filename)`
- **Custom templates**: `->template('custom.template')`
- **Custom logos**: `->logo('/path/to/logo.png')`
- **Date parsing**: Accepts Carbon instances or strings (parsed with `Carbon::parse()`)

### Creating from Arrays

[](#creating-from-arrays)

```
$invoice = Invoice::make([
    'buyer' => ['name' => 'John Doe', 'email' => 'john@example.com'],
    'date' => '2024-01-15',
    'series' => '2024',
    'sequence' => 1,
    'items' => [
        ['title' => 'Product', 'quantity' => 1, 'unit_price' => 100.00, 'tax_percentage' => 21.0],
    ],
]);

$receipt = UsageReceipt::make([
    'buyer' => ['name' => 'Jane Doe'],
    'date' => '2024-01-15',
    'document_id' => 'DOC-001',
    'user_id' => 'USER-001',
    'items' => [
        ['user' => 'Jane Doe', 'identifier' => 'XYZ', 'start_date' => '2024-01-15 10:00', 'end_date' => '2024-01-15 12:00', 'category' => 'Basic', 'price' => 10.00],
    ],
]);
```

Validation Requirements
-----------------------

[](#validation-requirements)

**Invoices** must have:

- A buyer with at least a name
- At least one item with: non-empty title, quantity &gt; 0, unit price, tax percentage (0-100 or null)

**Usage Receipts** must have:

- A buyer with at least a name
- At least one item with: user, identifier, start date, end date, category, and price

Development
-----------

[](#development)

```
composer install
./vendor/bin/sail up -d
./vendor/bin/sail phpunit
./vendor/bin/phpstan analyse
./vendor/bin/pint
```

Troubleshooting
---------------

[](#troubleshooting)

**Validation fails**: Ensure buyer and items meet requirements above.

**PDF generation fails**: Verify translations exist for the selected language and logo path is valid.

**Language not supported**: Supported languages are detected from `resources/lang/`. Add custom translations by publishing the language files.

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance58

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

16

Last Release

115d ago

Major Versions

v0.0.3 → v1.0.02026-01-12

v1.0.5 → v2.0.02026-01-20

PHP version history (2 changes)v0.0.1PHP ^8.4

v1.0.3PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/e6b749a2a89a26cee9b2394d5a932bb917fce9e3501ac6b3e5c05e24ab6b4bdb?d=identicon)[casteleinlucas](/maintainers/casteleinlucas)

![](https://www.gravatar.com/avatar/03c7b31a59291810edfcbe4245026d9bb234153d8c5caf7783c810bd9dd3a814?d=identicon)[Jasper Demmers](/maintainers/Jasper%20Demmers)

---

Top Contributors

[![casteleinlucas](https://avatars.githubusercontent.com/u/106868024?v=4)](https://github.com/casteleinlucas "casteleinlucas (27 commits)")

---

Tags

laravelpdfdompdfinvoiceinvoice-generator

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/simplepark-bv-laravel-invoices/health.svg)

```
[![Health](https://phpackages.com/badges/simplepark-bv-laravel-invoices/health.svg)](https://phpackages.com/packages/simplepark-bv-laravel-invoices)
```

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[barryvdh/laravel-dompdf

A DOMPDF Wrapper for Laravel

7.3k87.6M278](/packages/barryvdh-laravel-dompdf)[anam/phantommagick

PhantomMagick provides a simple API to ease the process of converting HTML to PDF or images

161456.4k2](/packages/anam-phantommagick)[torgodly/html2media

Html2Media is a versatile Laravel package that allows users to convert HTML content into high-quality PDFs with options for either downloading or triggering a print dialog. Ideal for generating documents, invoices, and reports, this package includes configurable settings for file name, page orientation, format, margins, and scale. Html2Media also provides seamless integration with Filament actions, enabling dynamic content rendering in modals and customizable output previews. Whether you need to save a PDF or send it directly to the printer, Html2Media simplifies the process with robust, flexible features.

4532.5k1](/packages/torgodly-html2media)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
