1 | <?php |
||
2 | |||
3 | namespace NeptuneSoftware\Invoice\Traits; |
||
4 | |||
5 | use NeptuneSoftware\Invoice\Models\Bill; |
||
6 | use NeptuneSoftware\Invoice\Models\Invoice; |
||
7 | use NeptuneSoftware\Invoice\Models\InvoiceLine; |
||
8 | |||
9 | trait HasInvoice |
||
10 | { |
||
11 | /** |
||
12 | * Set the polymorphic relation. |
||
13 | * |
||
14 | * @return mixed |
||
15 | */ |
||
16 | 23 | public function invoices() |
|
17 | { |
||
18 | 23 | return $this->morphMany(Invoice::class, 'related'); |
|
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
19 | } |
||
20 | |||
21 | /** |
||
22 | * @return mixed |
||
23 | */ |
||
24 | 23 | public function bills() |
|
25 | { |
||
26 | 23 | return $this->morphMany(Bill::class, 'related'); |
|
27 | } |
||
28 | } |
||
29 |