Skip to main content
Back to packages
1,550 GitHub stars

LaravelDaily/laravel-invoices

View on GitHub

Description

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

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' => '[email protected]',
],
]);
 
$item = InvoiceItem::make('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.

Recent Courses on Laravel Daily

Testing in Laravel 13 For Beginners

26 lessons
1 h 41 min read

Queues in Laravel 13

18 lessons
1 h 12 min read

How to Build Laravel 13 API From Scratch

30 lessons
1 h 23 min

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.