Filament: Invoice Editor with Items

Use the Repeater field and live methods to create an invoice with parent/children records, calculating the subtotal/total with taxes in live mode.


Get the Source Code:

How it works

The main logic lives in our InvoiceResource and is mainly contained within the form() method:

  • Using a Repeater field to allow adding multiple items
  • Using the live() method to calculate the subtotal and total in real time
  • Using a custom function to trigger calculations on items list change, quantity change
  • Disabling options in real-time to prevent duplicate items from being added

Here's how it looks in the code:


// ...
class InvoiceResource extends Resource
public static function form(Form $form): Form
$products = Product::get();
return $form
// Repeatable field for invoice items
// ...
The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.
Get the Source Code: All 50 Premium Examples for $99 Only Form Examples for $39