Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F8198504
Sku.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
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'
);
}
/**
* List of packages that use this SKU.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
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
Wed, Jul 8, 7:56 PM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1051891
Default Alt Text
Sku.php (1 KB)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment