| 1 |
<?php |
| 2 |
|
| 3 |
namespace SureCart\Models\Traits; |
| 4 |
|
| 5 |
use SureCart\Models\ShippingMethod; |
| 6 |
|
| 7 |
/** |
| 8 |
* If the model has shipping method. |
| 9 |
*/ |
| 10 |
trait HasShippingMethod { |
| 11 |
/** |
| 12 |
* Set the shipping method attribute |
| 13 |
* |
| 14 |
* @param object $value shipping method item data. |
| 15 |
* @return void |
| 16 |
*/ |
| 17 |
public function setShippingMethodAttribute( $value ) { |
| 18 |
$this->setRelation( 'shipping_method', $value, ShippingMethod::class ); |
| 19 |
} |
| 20 |
} |
| 21 |
|