Page MenuHomePhorge

Sku.php
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;
/**
* The eloquent definition of a Stock Keeping Unit (SKU).
*/
class Sku extends Model
{
use HasTranslations;
public $incrementing = false;
protected $keyType = 'string';
protected $casts = [
'units_free' => 'integer'
];
protected $fillable = [
'active',
'cost',
'description',
'handler_class',
'name',
// persist for annual domain registration
'period',
'title',
'units_free',
];
/** @var array Translatable properties */
public $translatable = [
'name',
'description',
];
/**
* List the entitlements that consume this SKU.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function entitlements()
{
return $this->hasMany('App\Entitlement');
}
public function packages()
{
return $this->belongsToMany(
'App\Package',
'package_skus'
)->using('App\PackageSku')->withPivot(['cost', 'qty']);
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, Apr 6, 1:07 AM (2 d, 18 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14036562
Default Alt Text
Sku.php (1 KB)

Event Timeline