HasUserMorph
Trait HasOwnerMorph.
Tags
Table of Contents
Properties
- $user : User|null
- $user_id : int
- $user_type : string
- $userEntity : UserEntity|null
Methods
- getUserAttribute() : mixed
- getUserEntityAttribute() : mixed
- isUser() : bool
- check if $user is the user (creator) of entity.
- user() : MorphTo
- userEntity() : BelongsTo
- userId() : int
- userType() : string
Properties
$user
public
User|null
$user
$user_id
public
int
$user_id
$user_type
public
string
$user_type
$userEntity
public
UserEntity|null
$userEntity
Methods
getUserAttribute()
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
booluser()
public
user() : MorphTo
Return values
MorphTouserEntity()
public
userEntity() : BelongsTo
Return values
BelongsTouserId()
public
userId() : int
Return values
intuserType()
public
userType() : string