PHPackages                             elitexp/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. elitexp/laravel-invoices

ActiveLibrary[Payment Processing](/categories/payments)

elitexp/laravel-invoices
========================

Missing invoices for Laravel

1.3.17(5y ago)024GPL-3.0-onlyPHPPHP &gt;=7

Since Nov 20Pushed 5y agoCompare

[ Source](https://github.com/elitexp/laravel-invoices)[ Packagist](https://packagist.org/packages/elitexp/laravel-invoices)[ Docs](https://github.com/elitexp/laravel-invoices)[ RSS](/packages/elitexp-laravel-invoices/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (5)Versions (26)Used By (0)

Laravel Invoices
================

[](#laravel-invoices)

[![Latest Stable Version](https://camo.githubusercontent.com/4a706c74806efd16b391ca538611fb6c2cd05c7f86a8a10a66bf4bb989af1ee0/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c6461696c792f6c61726176656c2d696e766f696365732f762f737461626c65)](https://packagist.org/packages/laraveldaily/laravel-invoices)[![Total Downloads](https://camo.githubusercontent.com/013b27a839328811508949aa8ada235da0d44e436d2fdc8112cbfbf37e01e238/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c6461696c792f6c61726176656c2d696e766f696365732f646f776e6c6f616473)](https://packagist.org/packages/laraveldaily/laravel-invoices)[![Latest Unstable Version](https://camo.githubusercontent.com/8ae489089f88c338602666b9aa669710841e35f9ffd4b8bb3b8469a6d7bc6661/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c6461696c792f6c61726176656c2d696e766f696365732f762f756e737461626c65)](https://packagist.org/packages/laraveldaily/laravel-invoices)[![License](https://camo.githubusercontent.com/bf1b14bb6961435739e06a6b8fd8a42f424e089475309dbc73b2f005d7c73ce2/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c6461696c792f6c61726176656c2d696e766f696365732f6c6963656e7365)](https://packagist.org/packages/laraveldaily/laravel-invoices)

This Laravel package provides an easy to use interface to generate **Invoice PDF files** with your provided data.

Invoice file can be stored, downloaded, streamed on any of the filesystems you have configured. Supports different templates and locales.

Originally package was developed on PHP 7.3.11 and Laravel 6.2, but should work on lower versions too.

Features
--------

[](#features)

- Taxes - fixed or rate - for item or for invoice
- Discounts - fixed or by percentage - for item or for invoice
- Shipping - add shipping price to your invoices
- Automatic calculation - provide minimal set of information, or calculate yourself and provide what to print
- Due date
- Easy to customize currency format
- Serial numbers as you like it
- Templates
- Translations
- Global settings and overrides on-the-fly

Change log
----------

[](#change-log)

Please see the [changelog](CHANGELOG.md) for more information on what has changed recently.

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

[](#installation)

Via Composer

```
$ composer require laraveldaily/laravel-invoices
```

After installing Laravel Invoices, publish its assets, views, translations and config using the `invoices:install` Artisan command:

```
$ php artisan invoices:install
```

### Updates

[](#updates)

Since it is evolving fast you might want to have latest template after update using Artisan command:

```
$ php artisan invoices:update
```

> It will give a warning if you really want to override default resources

Or alternatively it can be done separately.

```
$ php artisan vendor:publish --tag=invoices.views --force
```

```
$ php artisan vendor:publish --tag=invoices.translations --force
```

### For Laravel version &lt; 5.5

[](#for-laravel-version--55)

If you don't use auto-discovery, add the ServiceProvider to the providers array in `config/app.php`

```
LaravelDaily\Invoices\InvoiceServiceProvider::class,
```

If you want to use the facade to generate invoices, add this to your facades in `config/app.php`

```
'Invoice' => LaravelDaily\Invoices\Facades\Invoice::class
```

Basic Usage
-----------

[](#basic-usage)

**RandomController.php**

```
use LaravelDaily\Invoices\Invoice;
use LaravelDaily\Invoices\Classes\Buyer;
use LaravelDaily\Invoices\Classes\InvoiceItem;

        $customer = new Buyer([
            'name'          => 'John Doe',
            'custom_fields' => [
                'email' => 'test@example.com',
            ],
        ]);

        $item = (new InvoiceItem())->title('Service 1')->pricePerUnit(2);

        $invoice = Invoice::make()
            ->buyer($customer)
            ->discountByPercent(10)
            ->taxRate(15)
            ->shipping(1.99)
            ->addItem($item);

        return $invoice->stream();
```

See result [Invoice\_AA\_00001.pdf](examples/invoice_AA_00001.pdf).

Advanced Usage
--------------

[](#advanced-usage)

```
use LaravelDaily\Invoices\Invoice;
use LaravelDaily\Invoices\Classes\Party;
use LaravelDaily\Invoices\Classes\InvoiceItem;

        $client = new Party([
            'name'          => 'Roosevelt Lloyd',
            'phone'         => '(520) 318-9486',
            'custom_fields' => [
                'note'        => 'IDDQD',
                'business id' => '365#GG',
            ],
        ]);

        $customer = new Party([
            'name'          => 'Ashley Medina',
            'address'       => 'The Green Street 12',
            'code'          => '#22663214',
            'custom_fields' => [
                'order number' => '> 654321  7,
    ],

    'serial_number' => [
        'series'           => 'AA',
        'sequence'         => 1,
        /**
         * Sequence will be padded accordingly, for ex. 00001
         */
        'sequence_padding' => 5,
        'delimiter'        => '.',
        /**
         * Supported tags {SERIES}, {DELIMITER}, {SEQUENCE}
         * Example: AA.00001
         */
        'format'           => '{SERIES}{DELIMITER}{SEQUENCE}',
    ],

    'currency' => [
        'code'                => 'eur',
        /**
         * Usually cents
         * Used when spelling out the amount and if your currency has decimals.
         *
         * Example: Amount in words: Eight hundred fifty thousand sixty-eight EUR and fifteen ct.
         */
        'fraction'            => 'ct.',
        'symbol'              => '€',
        /**
         * Example: 19.00
         */
        'decimals'            => 2,
        /**
         * Example: 1.99
         */
        'decimal_point'       => '.',
        /**
         * By default empty.
         * Example: 1,999.00
         */
        'thousands_separator' => '',
        /**
         * Supported tags {VALUE}, {SYMBOL}, {CODE}
         * Example: 1.99 €
         */
        'format'              => '{VALUE} {SYMBOL}',
    ],

    'paper' => [
        // A4 = 210 mm x 297 mm = 595 pt x 842 pt
        'size'        => 'a4',
        'orientation' => 'portrait',
    ],

    'disk' => 'local',

    'seller' => [
        /**
         * Class used in templates via $invoice->seller
         *
         * Must implement LaravelDaily\Invoices\Contracts\PartyContract
         *      or extend LaravelDaily\Invoices\Classes\Party
         */
        'class' => \LaravelDaily\Invoices\Classes\Seller::class,

        /**
         * Default attributes for Seller::class
         */
        'attributes' => [
            'name'          => 'Towne, Smith and Ebert',
            'address'       => '89982 Pfeffer Falls Damianstad, CO 66972-8160',
            'code'          => '41-1985581',
            'vat'           => '123456789',
            'phone'         => '760-355-3930',
            'custom_fields' => [
                /**
                 * Custom attributes for Seller::class
                 *
                 * Used to display additional info on Seller section in invoice
                 * attribute => value
                 */
                'SWIFT' => 'BANK101',
            ],
        ],
    ],
];
```

Available Methods
-----------------

[](#available-methods)

Almost every configuration value can be overrided dinamically by methods.

Invoice
-------

[](#invoice)

#### General

[](#general)

- addItem(InvoiceItem $item)
- addItems(Iterable)
- name(string)
- seller(PartyContract)
- buyer(PartyContract)
- template(string)
- logo(string) - path to logo
- getLogo() - returns base64 encoded image, used in template to avoid path issues
- filename(string) - overrides automatic filename
- taxRate(float)
- shipping(float) - shipping amount
- **totalDiscount(float) - If not provided calculates itself**
- **totalTaxes(float) - If not provided calculates itself**
- **totalAmount(float) - If not provided calculates itself**
- **taxableAmount(float) - If not provided calculates itself**

#### Serial number

[](#serial-number)

- series(string)
- sequence(int)
- delimiter(string)
- sequencePadding(int)
- serialNumberFormat(string)
- getSerialNumber() - returns formatted serial number

#### Date

[](#date)

- date(Carbon)
- dateFormat(string) - Carbon format of date
- payUntilDays(int) - Days payment due since invoice issued
- getDate() - returns formatted date
- getPayUntilDate() - return formatted due date

#### Currency

[](#currency)

- currencyCode(string) - EUR, USD etc.
- currencyFraction(string) - Cents, Centimes, Pennies etc.
- currencySymbol(string)
- currencyDecimals(int)
- currencyDecimalPoint(string)
- currencyThousandsSeparator(string)
- currencyFormat(string)
- getAmountInWords(float) - Spells out float to words (only english)
- getTotalAmountInWords() - spells out total\_amount
- formatCurrency(float) - returns formatted value with currency settings '$ 1,99'

#### File

[](#file)

- stream() - opens invoice in browser
- download() - offers to download invoice
- save($disk) - saves invoice to storage, use -&gt;filename() for filename
- url() - return url of saved invoice

InvoiceItem
-----------

[](#invoiceitem)

- title(string) - product or service name
- units(string) - measurement units of item (adds units columns if set)
- quantity(float) - amount of units of item
- pricePerUnit(float)
- discount(float) - discount in currency
- discountByPercent(float) - discount by percents discountByPercent(15) means 15%
- tax(float)
- taxByPercent(float)
- **subTotalPrice(float) - If not provided calculates itself**

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Author
------

[](#author)

- [David Lun](https://github.com/mc0de)

License
-------

[](#license)

GPL-3.0-only. Please see the [license file](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 78% 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 ~11 days

Recently: every ~2 days

Total

24

Last Release

2111d ago

PHP version history (2 changes)1.0.0PHP &gt;=7

1.3.9PHP &gt;=7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e5d08f6cf6b9cdf7215ab9cc5d6e09ab5a123f5037a9663249e6df0ba2222b4?d=identicon)[elitexp](/maintainers/elitexp)

---

Top Contributors

[![mc0de](https://avatars.githubusercontent.com/u/8727992?v=4)](https://github.com/mc0de "mc0de (39 commits)")[![ryancco](https://avatars.githubusercontent.com/u/20148569?v=4)](https://github.com/ryancco "ryancco (6 commits)")[![LaravelDaily](https://avatars.githubusercontent.com/u/15341846?v=4)](https://github.com/LaravelDaily "LaravelDaily (2 commits)")[![PovilasKorop](https://avatars.githubusercontent.com/u/1510147?v=4)](https://github.com/PovilasKorop "PovilasKorop (2 commits)")[![noud](https://avatars.githubusercontent.com/u/1333629?v=4)](https://github.com/noud "noud (1 commits)")

---

Tags

laravelinvoiceinvoices

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[omalizadeh/laravel-multi-payment

A driver-based laravel package for online payments via multiple gateways

491.1k](/packages/omalizadeh-laravel-multi-payment)[asciisd/knet

Knet package is provides an expressive, fluent interface to KNet's payment services.

141.1k](/packages/asciisd-knet)

PHPackages © 2026

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