Skip to content

Commit 2ea6b0f

Browse files
committed
readme
1 parent 277f0bb commit 2ea6b0f

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,9 +617,41 @@ See the [Dompdf font guide](https://github.com/dompdf/dompdf).
617617

618618
## Customizing the Template
619619

620-
To customize the invoice template, you can publish the provided views and modify them as needed.
620+
To customize the invoice template, first publish the views using:
621621

622-
Alternatively, you can create a completely custom template. Ensure that your custom template follows the same structure and conventions as the default one to maintain compatibility with various use cases.
622+
```bash
623+
php artisan vendor:publish --tag="invoices-views"
624+
```
625+
626+
Then modify the blade files to your liking.
627+
628+
Alternatively, you can create a completely custom template by editing the config file like this:
629+
630+
```php
631+
return [
632+
633+
// ...
634+
635+
'pdf' => [
636+
637+
/**
638+
* The template used to render the PDF
639+
*/
640+
'template' => 'default.layout',
641+
642+
'template_data' => [
643+
/**
644+
* The color displayed at the top of the PDF
645+
*/
646+
'color' => '#050038',
647+
],
648+
649+
],
650+
651+
];
652+
```
653+
654+
Ensure that your custom template follows the same structure and conventions as the default one to maintain compatibility with various use cases.
623655

624656
## Testing
625657

0 commit comments

Comments
 (0)