HasOwnerMorph
Trait HasOwnerMorph.
Tags
Table of Contents
Properties
- $owner : User|null
- $owner_id : int
- $owner_type : string
- $ownerEntity : UserEntity|null
Methods
- getOwnerAttribute() : mixed
- getOwnerEntityAttribute() : mixed
- isOwner() : bool
- check if $user is the owner of entity.
- owner() : MorphTo
- ownerEntity() : BelongsTo
- ownerId() : int
- ownerType() : string
Properties
$owner
public
User|null
$owner
$owner_id
public
int
$owner_id
$owner_type
public
string
$owner_type
$ownerEntity
public
UserEntity|null
$ownerEntity
Methods
getOwnerAttribute()
public
getOwnerAttribute() : mixed
getOwnerEntityAttribute()
public
getOwnerEntityAttribute() : mixed
isOwner()
check if $user is the owner of entity.
public
isOwner(User $user) : bool
Parameters
- $user : User
Return values
boolowner()
public
owner() : MorphTo
Return values
MorphToownerEntity()
public
ownerEntity() : BelongsTo
Return values
BelongsToownerId()
public
ownerId() : int
Return values
intownerType()
public
ownerType() : string