invoice making form template laravel code example

Example 1: laravel invoice toturial

$ php artisan invoices:update

Example 2: laravel invoice toturial

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 = (new InvoiceItem())->title('Service 1')->pricePerUnit(2);

        $invoice = Invoice::make()
            ->buyer($customer)
            ->discountByPercent(10)
            ->taxRate(15)
            ->shipping(1.99)
            ->addItem($item);

        return $invoice->stream();

Tags:

Php Example