SavedListMember
extends Model
in package
implements
Entity, IsNotifyInterface
Uses
HasEntity, HasUserMorph
Class Saved.
Tags
Table of Contents
Interfaces
- Entity
- Interface Entity.
- IsNotifyInterface
- Interface Entity.
Constants
- ENTITY_TYPE = 'saved_list_member'
Properties
- $collection : SavedList
- $id : int
- $list_id : int
- $timestamps : mixed
- $user_id : int
- $user_type : string
- $fillable : mixed
- $table : mixed
Methods
- collection() : HasOne
- entityId() : int
- entityType() : string
- getUserAttribute() : mixed
- getUserEntityAttribute() : mixed
- isUser() : bool
- check if $user is the user (creator) of entity.
- moduleName() : string
- toNotification() : array<string|int, mixed>|null
- creator result must contain User owner.
- user() : MorphTo
- userEntity() : BelongsTo
- userId() : int
- userType() : string
Constants
ENTITY_TYPE
public
mixed
ENTITY_TYPE
= 'saved_list_member'
Properties
$collection
public
SavedList
$collection
$id
public
int
$id
$list_id
public
int
$list_id
$timestamps
public
mixed
$timestamps
= false
$user_id
public
int
$user_id
$user_type
public
string
$user_type
$fillable
protected
mixed
$fillable
= ['list_id', 'user_id', 'user_type']
$table
protected
mixed
$table
= 'saved_list_members'
Methods
collection()
public
collection() : HasOne
Return values
HasOneentityId()
public
entityId() : int
Return values
intentityType()
public
entityType() : string
Return values
stringgetUserAttribute()
public
getUserAttribute() : mixed
getUserEntityAttribute()
public
getUserEntityAttribute() : 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
stringtoNotification()
creator result must contain User owner.
public
toNotification() : array<string|int, mixed>|null
notification class.
Return values
array<string|int, mixed>|nulluser()
public
user() : MorphTo
Return values
MorphTouserEntity()
public
userEntity() : BelongsTo
Return values
BelongsTouserId()
public
userId() : int
Return values
intuserType()
public
userType() : string