Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117883633
Sku.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
Sku.php
View Options
<?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
\E
ntitlement'
);
}
public
function
packages
()
{
return
$this
->
belongsToMany
(
'App
\P
ackage'
,
'package_skus'
)->
using
(
'App
\P
ackageSku'
)->
withPivot
([
'cost'
,
'qty'
]);
}
}
File Metadata
Details
Attached
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)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline