Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120833355
Sku.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
854 B
Referenced Files
None
Subscribers
None
Sku.php
View Options
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
/**
The eloquent definition of a Stock Keeping Unit (SKU).
*/
class
Sku
extends
Model
{
public
$incrementing
=
false
;
protected
$keyType
=
'string'
;
protected
$casts
=
[
'cost'
=>
'float'
,
];
protected
$fillable
=
[
'title'
,
'description'
,
'cost'
];
/**
Provide a custom ID (uuid) property.
@return void
*/
protected
static
function
boot
()
{
parent
::
boot
();
static
::
creating
(
function
(
$sku
)
{
$sku
->{
$sku
->
getKeyName
()}
=
\App\Utils
::
uuidStr
();
}
);
}
/**
List the entitlements that consume this SKU.
@return Entitlement[]
*/
public
function
entitlements
()
{
return
$this
->
hasMany
(
'App
\E
ntitlement'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 12:46 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18726558
Default Alt Text
Sku.php (854 B)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline