Skip to content

Commit bf16e81

Browse files
author
rob
committed
Add custom data to be parsed to the template
1 parent 0d8896e commit bf16e81

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/Invoice.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ class Invoice
7171
*/
7272
public $logo;
7373

74+
/**
75+
* @var array
76+
*/
77+
public $custom;
78+
7479
/**
7580
* @var float
7681
*/
@@ -173,6 +178,9 @@ public function __construct($name = 'Invoice')
173178
$this->currency_thousands_separator = config('invoices.currency.thousands_separator');
174179
$this->currency_format = config('invoices.currency.format');
175180

181+
// Custom data
182+
$this->custom = [];
183+
176184
$this->disk = config('invoices.disk');
177185
$this->table_columns = static::TABLE_COLUMNS;
178186
}

src/Traits/InvoiceHelpers.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,17 @@ public function buyer(PartyContract $buyer)
153153
return $this;
154154
}
155155

156+
/**
157+
* @param PartyContract $buyer
158+
* @return $this
159+
*/
160+
public function custom(array $custom)
161+
{
162+
$this->custom = $custom;
163+
164+
return $this;
165+
}
166+
156167
/**
157168
* @param string $template
158169
* @return $this

0 commit comments

Comments
 (0)