Changeset View
Changeset View
Standalone View
Standalone View
src/app/Package.php
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | public function isDomain() | ||||
if ($sku->handler_class::entitleableClass() == \App\Domain::class) { | if ($sku->handler_class::entitleableClass() == \App\Domain::class) { | ||||
return true; | return true; | ||||
} | } | ||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
/** | |||||
* SKUs of this package. | |||||
* | |||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany | |||||
*/ | |||||
public function skus() | public function skus() | ||||
{ | { | ||||
return $this->belongsToMany( | return $this->belongsToMany( | ||||
'App\Sku', | 'App\Sku', | ||||
'package_skus' | 'package_skus' | ||||
)->using('App\PackageSku')->withPivot( | )->using('App\PackageSku')->withPivot( | ||||
['qty'] | ['qty'] | ||||
); | ); | ||||
} | } | ||||
} | } |