FriendList
extends Model
in package
implements
PrivacyList, BigNumberId, HasTitle
Uses
HasEntity, HasUserMorph, HasUserAsOwnerMorph, HasFactory, HasBigNumberId
Class FriendList.
Tags
Table of Contents
Interfaces
- PrivacyList
- Interface Entity.
- BigNumberId
- Interface BigNumberId.
- HasTitle
Constants
- ENTITY_TYPE = 'friend_list'
- PRIVACY_TYPE = 'user_friend_list'
Properties
- $id : int
- $incrementing : mixed
- $name : string
- $userEntities : BelongsToMany
- $users : BelongsToMany
- $fillable : mixed
- $primaryKey : mixed
Methods
- entityId() : int
- entityType() : string
- factory() : FriendListFactory
- getUserAttribute() : mixed
- getUserEntityAttribute() : mixed
- isUser() : bool
- check if $user is the user (creator) of entity.
- moduleName() : string
- owner() : MorphTo
- ownerEntity() : BelongsTo
- ownerId() : int
- ownerType() : string
- setEntityId() : void
- toPrivacyLists() : array<string|int, mixed>
- toTitle() : string
- user() : MorphTo
- userEntities() : BelongsToMany
- userEntity() : BelongsTo
- userId() : int
- users() : BelongsToMany
- userType() : string
- newFactory() : FriendListFactory
Constants
ENTITY_TYPE
public
mixed
ENTITY_TYPE
= 'friend_list'
PRIVACY_TYPE
public
mixed
PRIVACY_TYPE
= 'user_friend_list'
Properties
$id
public
int
$id
$incrementing
public
mixed
$incrementing
= false
$name
public
string
$name
$userEntities
public
BelongsToMany
$userEntities
$users
public
BelongsToMany
$users
$fillable
protected
mixed
$fillable
= ['user_id', 'user_type', 'name']
$primaryKey
protected
mixed
$primaryKey
= 'id'
Methods
entityId()
public
entityId() : int
Return values
intentityType()
public
entityType() : string
Return values
stringfactory()
public
static factory() : FriendListFactory
Return values
FriendListFactorygetUserAttribute()
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
stringowner()
public
owner() : MorphTo
Return values
MorphToownerEntity()
public
ownerEntity() : BelongsTo
Return values
BelongsToownerId()
public
ownerId() : int
Return values
intownerType()
public
ownerType() : string
Return values
stringsetEntityId()
public
setEntityId(int $id) : void
Parameters
- $id : int
toPrivacyLists()
public
toPrivacyLists() : array<string|int, mixed>
Return values
array<string|int, mixed>toTitle()
public
toTitle() : string
Return values
stringuser()
public
user() : MorphTo
Return values
MorphTouserEntities()
public
userEntities() : BelongsToMany
Return values
BelongsToManyuserEntity()
public
userEntity() : BelongsTo
Return values
BelongsTouserId()
public
userId() : int
Return values
intusers()
public
users() : BelongsToMany
Return values
BelongsToManyuserType()
public
userType() : string
Return values
stringnewFactory()
protected
static newFactory() : FriendListFactory