PHPackages                             ikidnapmyself/laravel-invoicable - 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. [Database &amp; ORM](/categories/database)
4. /
5. ikidnapmyself/laravel-invoicable

Abandoned → [ikidnapmyself/laravel-invoicable](/?search=ikidnapmyself%2Flaravel-invoicable)ArchivedLibrary[Database &amp; ORM](/categories/database)

ikidnapmyself/laravel-invoicable
================================

Easy invoice generation using Laravel Eloquent, originally sander-van-hooft/laravel-invoicable

v2.0.2(6y ago)08[1 PRs](https://github.com/ikidnapmyself/laravel-invoicable/pulls)MITPHPPHP ~5.6|~7.0

Since Jun 21Pushed 4y agoCompare

[ Source](https://github.com/ikidnapmyself/laravel-invoicable)[ Packagist](https://packagist.org/packages/ikidnapmyself/laravel-invoicable)[ Docs](https://github.com/ikidnapmyself/laravel-invoicable)[ RSS](/packages/ikidnapmyself-laravel-invoicable/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (9)Versions (15)Used By (0)

laravel-invoicable
==================

[](#laravel-invoicable)

**Important!** This repository is a fork of `sandervanhooft/laravel-invoicable` and will be developed for personal usage. Any contribution, more than welcome.

---

Easy invoice creation for Laravel 5.4 and up. Unlike Laravel Cashier, this package is payment gateway agnostic.

If you're looking for Mollie payment processing, be sure to check out [laravel-payable-redirect-mollie](https://github.com/sandervanhooft/laravel-payable-redirect-mollie).

Structure
---------

[](#structure)

```
database/
resources
src/
tests/
vendor/

```

Install
-------

[](#install)

Via Composer

```
$ composer require ikidnapmyself/laravel-invoicable
```

You can publish the migration with:

```
$ php artisan vendor:publish --provider="IKidnapMyself\Invoicable\InvoicableServiceProvider" --tag="migrations"
```

After the migration has been published you can create the invoices and invoice\_lines tables by running the migrations:

```
$ php artisan migrate
```

Optionally, you can also publish the `invoicable.php` config file with:

```
$ php artisan vendor:publish --provider="IKidnapMyself\Invoicable\InvoicableServiceProvider" --tag="config"
```

This is what the default config file looks like:

```
return [
    'default_currency' => 'EUR',
    'default_status' => 'concept',
    'locale' => 'nl_NL',
];
```

If you'd like to override the design of the invoice blade view and pdf, publish the view:

```
$ php artisan vendor:publish --provider="IKidnapMyself\Invoicable\InvoicableServiceProvider" --tag="views"
```

You can now edit `receipt.blade.php` in `/resources/views/invoicable/receipt.blade.php` to match your style.

Usage
-----

[](#usage)

**Money figures are in cents!**

Add the invoicable trait to the Eloquent model which needs to be invoiced (typically an Order model):

```
use Illuminate\Database\Eloquent\Model;
use IKidnapMyself\Invoicable\IsInvoicable\IsInvoicableTrait;

class Order extends Model
{
    use IsInvoicableTrait; // enables the ->invoices() Eloquent relationship
}
```

Now you can create invoices for an Order:

```
$order = new Order();
$invoice = $order->invoices()->create([]);

// To add a line to the invoice, use these example parameters:
//  Amount:
//      121 (€1,21) incl tax
//      100 (€1,00) excl tax
//  Description: 'Some description'
//  Tax percentage: 0.21 (21%)
$invoice = $invoice->addLinetInclTax(121, 'Some description', 0.21);
$invoice = $invoice->addLinetExclTax(100, 'Some description', 0.21);

// Invoice totals are now updated
echo $invoice->total; // 242
echo $invoice->tax; // 42

// Set additional information (optional)
$invoice->currency; // defaults to 'EUR' (see config file)
$invoice->status; // defaults to 'concept' (see config file)
$invoice->receiver_info; // defaults to null
$invoice->sender_info; // defaults to null
$invoice->payment_info; // defaults to null
$invoice->note; // defaults to null

// access individual invoice lines using Eloquent relationship
$invoice->lines;
$invoice->lines();

// Access as pdf
$invoice->download(); // download as pdf (returns http response)
$invoice->pdf(); // or just grab the pdf (raw bytes)

// Handling discounts
// By adding a line with a negative amount.
$invoice = $invoice->addLinetInclTax(-121, 'A nice discount', 0.21);

// Or by applying the discount and discribing the discount manually
$invoice = $invoice->addLinetInclTax(121 * (1 - 0.30), 'Product XYZ incl 30% discount', 0.21);

// Convenience methods
Invoice::findByReference($reference);
Invoice::findByReferenceOrFail($reference);
$invoice->invoicable() // Access the related model
```

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

[](#change-log)

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

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Sander van Hooft](https://github.com/sandervanhooft)
- [All Contributors](../../contributors)
- Inspired by [Laravel Cashier](https://github.com/laravel/cashier)'s invoices.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~60 days

Recently: every ~109 days

Total

13

Last Release

2529d ago

Major Versions

1.0.8 → v2.x-dev2019-03-29

PHP version history (2 changes)1.0.0PHP ~5.6|~7.0

v2.x-devPHP &gt;=7.2

### Community

Maintainers

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

---

Top Contributors

[![sandervanhooft](https://avatars.githubusercontent.com/u/7265703?v=4)](https://github.com/sandervanhooft "sandervanhooft (33 commits)")[![ikidnapmyself](https://avatars.githubusercontent.com/u/13779866?v=4)](https://github.com/ikidnapmyself "ikidnapmyself (25 commits)")[![kablanfatih](https://avatars.githubusercontent.com/u/33814925?v=4)](https://github.com/kablanfatih "kablanfatih (6 commits)")[![ugurdnlr](https://avatars.githubusercontent.com/u/50822963?v=4)](https://github.com/ugurdnlr "ugurdnlr (2 commits)")[![PovilasKorop](https://avatars.githubusercontent.com/u/1510147?v=4)](https://github.com/PovilasKorop "PovilasKorop (1 commits)")

---

Tags

laraveleloquentpaymentsinvoiceinvoicablelaravel-invoicable

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ikidnapmyself-laravel-invoicable/health.svg)

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

###  Alternatives

[sander-van-hooft/laravel-invoicable

Easy invoice generation using Laravel Eloquent

14711.9k](/packages/sander-van-hooft-laravel-invoicable)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)

PHPackages © 2026

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