Generate Invoice PDF and Send via Email

Filament 4/5
Also available in Filament 3 version

A demonstration of generating PDFs after record creation, downloading them from a Filament panel, and sending invoices via email.

01JAYSQ1S8PHV0VDY4JJ592F91

Get the Source Code:

Only This Example

$9

One-time payment

Full source code for Generate Invoice PDF and Send via Email
Downloadable ZIP file with the source code
Lifetime access to this example
GitHub Sign in with GitHub to buy

Sign in first, then complete your $9 checkout.

Best value — all 172 examples

FilamentExamples Membership

$99 /year
or
$199 lifetime
Access to code of all 172 examples
Future new examples and updates included
FilaCheck Pro package licence included
MCP server included
View membership plans

30-day money-back guarantee

How it works

In a Filament resource, we have a simple form to enter details for the invoice.

app/Filament/Resources/Invoices/Schemas/InvoiceForm.php:

use Filament\Schemas\Schema;
use Filament\Forms\Components\TextInput;
 
public static function configure(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('customer_name')
->required(),
TextInput::make('customer_email')
->required(),
TextInput::make('product')
->required(),
TextInput::make('price')
->numeric()
->required(),
]);
}

Two models lifecycle events are used when a record is being creating and created. Within the creating event, a serial is generated, and after the record is created, a job to generate a PDF is dispatched.

The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.