Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Invoices

Laravel Invoices Laravel Package

elegantly/laravel-invoices

A robust Laravel package for managing invoices with database storage, serial numbering, and PDF generation. Add taxes, discounts, payment instructions, and QR codes, then render, store, download, or customize invoices with ease.

View on GitHub
Deep Wiki
Context7

Elegantly/laravel-invoices is a robust package for managing invoices in Laravel applications. It combines database storage, automatic serial numbering, and PDF generation, making it easy to create, render, store, and download professional invoices.

  • Flexible PDF invoices via the PdfInvoice class, including view rendering and file storage
  • Taxes and discounts by percentage or fixed amount
  • Payment instructions with optional QR code generation
  • Customizable templates and invoice layouts
  • Laravel-native integration for controllers, views, and Livewire components
Frequently asked questions about Laravel Invoices
How do I install elegantly/laravel-invoices in a Laravel app?
Install it with composer require elegantly/laravel-invoices, then publish the config and migrations and run php artisan migrate if you want database-backed invoices. The package pulls in dompdf/dompdf and elegantly/laravel-money with brick/money for rendering and minor-unit money math. The rendering layer also works without the migrations if you only need PDF generation.
Which Laravel versions does laravel-invoices support?
The package is built for modern Laravel applications and follows standard package conventions, but you should verify exact version constraints with composer show elegantly/laravel-invoices or on Packagist before committing. Listing metadata can be stale or future-dated, so treat Packagist as the source of truth. Test the install against your specific Laravel and PHP versions in CI.
Can I generate PDF invoices without using a database?
Yes. The PdfInvoice, PdfInvoiceItem, Seller, Buyer, Address, and PaymentInstruction classes form a standalone rendering layer that needs no Eloquent models, migrations, or persistence. You can build an invoice object from your existing domain data and render, store, or download the PDF. The Invoice Eloquent model and serial-number generator are optional and only needed if you want the package to persist invoices.
How do I customize the invoice PDF template?
Publish the package Blade views and override the invoice template in your application. Keep in mind that rendering uses dompdf, which does not support flexbox or CSS grid, so modern layout techniques will not work. Design with tables, floats, and simple CSS, and test the output against real invoice data.
How does serial number generation work in laravel-invoices?
The config exposes a serial-number generator with prefix, series, and format tokens such as PPYYCCCC, and auto_generate true assigns a number when an invoice model is created. If you need gapless or strictly monotonic numbering for legal compliance, review concurrent creation, transaction rollback, soft deletes, and the default cascade_invoice_delete_to_invoice_items setting. You can disable auto_generate and assign numbers manually, but you then own the continuity guarantees.
Can I attach an invoice PDF to a Laravel Mailable or Notification?
Yes. The package integrates with Mailables and Notifications so you can attach a rendered invoice PDF directly from your mail flow. This is one of the practical wins over assembling dompdf output yourself. You still need to manage file paths, storage disks, and cleanup of generated PDFs.
How do I add taxes and discounts to an invoice?
You can add taxes and discounts as either a percentage or a fixed amount using the fluent PdfInvoice API. The package handles presentation and minor-unit math, but it is not a tax engine: reverse charge, VAT ID validation, multi-jurisdiction rates, and e-invoicing formats like Factur-X or Peppol UBL are out of scope. You remain responsible for tax determination logic.
Is elegantly/laravel-invoices actively maintained and safe for production?
It is a small MIT-licensed package with a readable surface area and low adoption, so the main risk is abandonment and bus factor rather than licensing. Because the codebase is small, forking is viable, but you should budget for maintenance instead of assuming upstream support. Verify release cadence and version constraints on Packagist and pin versions in composer.json.
How do I add payment instructions and a QR code to an invoice?
Use the PaymentInstruction class to add payment details, and the package can generate a QR code for them. You can combine this with seller and buyer details and custom fields to produce a complete payment section. Test QR output in the final PDF because dompdf rendering constraints apply.
What are alternatives to laravel-invoices for PDF invoice generation?
You can render PDFs directly with dompdf, use wkhtmltopdf-based packages like laravel-snappy, or headless Chrome tools such as Browsershot for better CSS support. For money and rounding, brick/money or elegantly/laravel-money are solid lower-level choices. If your invoicing is event-sourced or a billing service is the system of record, only the rendering layer of this package is relevant.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections