UserPreference
extends Model
in package
implements
Entity
Uses
HasEntity, HasUserMorph
Class UserPreference.
Table of Contents
Interfaces
- Entity
- Interface Entity.
Constants
- ENTITY_TYPE = 'user_preference'
Properties
- $created_at : string
- $id : int
- $name : string
- $type : string
- $updated_at : string
- $user_id : int
- $user_type : string
- $value : mixed
- $fillable : array<string|int, string>
- $table : mixed
Methods
- entityId() : int
- entityType() : string
- getAdminBrowseUrlAttribute() : string
- getAdminEditUrlAttribute() : string
- getUserAttribute() : mixed
- getUserEntityAttribute() : mixed
- getValueAttribute() : mixed
- isUser() : bool
- check if $user is the user (creator) of entity.
- moduleName() : string
- user() : MorphTo
- userEntity() : BelongsTo
- userId() : int
- userType() : string
Constants
ENTITY_TYPE
public
mixed
ENTITY_TYPE
= 'user_preference'
Properties
$created_at
public
string
$created_at
$id
public
int
$id
$name
public
string
$name
$type
public
string
$type
$updated_at
public
string
$updated_at
$user_id
public
int
$user_id
$user_type
public
string
$user_type
$value
public
mixed
$value
$fillable
protected
array<string|int, string>
$fillable
= ['user_id', 'user_type', 'name', 'type', 'default_value', 'value', 'created_at', 'updated_at']
$table
protected
mixed
$table
= 'user_preferences'
Methods
entityId()
public
entityId() : int
Return values
intentityType()
public
entityType() : string
Return values
stringgetAdminBrowseUrlAttribute()
public
getAdminBrowseUrlAttribute() : string
Return values
stringgetAdminEditUrlAttribute()
public
getAdminEditUrlAttribute() : string
Return values
stringgetUserAttribute()
public
getUserAttribute() : mixed
getUserEntityAttribute()
public
getUserEntityAttribute() : mixed
getValueAttribute()
public
getValueAttribute(mixed $value) : mixed
Parameters
- $value : mixed
isUser()
check if $user is the user (creator) of entity.
public
isUser(User $user) : bool
Parameters
- $user : User
Return values
boolmoduleName()
public
moduleName() : string
Return values
stringuser()
public
user() : MorphTo
Return values
MorphTouserEntity()
public
userEntity() : BelongsTo
Return values
BelongsTouserId()
public
userId() : int
Return values
intuserType()
public
userType() : string