| 1 |
<?php |
| 2 |
|
| 3 |
namespace SureCart\Models\Traits; |
| 4 |
|
| 5 |
use SureCart\Models\Invoice; |
| 6 |
|
| 7 |
/** |
| 8 |
* If the model has an attached customer. |
| 9 |
*/ |
| 10 |
trait HasInvoice { |
| 11 |
/** |
| 12 |
* Set the affiliation attribute |
| 13 |
* |
| 14 |
* @param object $value Array of payout objects. |
| 15 |
* |
| 16 |
* @return void |
| 17 |
*/ |
| 18 |
public function setInvoiceAttribute( $value ) { |
| 19 |
$this->setRelation( 'invoice', $value, Invoice::class ); |
| 20 |
} |
| 21 |
} |
| 22 |
|