MetaFox

HasOwnerMorph

Trait HasOwnerMorph.

Tags
mixin

HasRelationships

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

Methods

getOwnerEntityAttribute()

public getOwnerEntityAttribute() : mixed

isOwner()

check if $user is the owner of entity.

public isOwner(User $user) : bool
Parameters
$user : User
Return values
bool

ownerEntity()

public ownerEntity() : BelongsTo
Return values
BelongsTo

ownerType()

public ownerType() : string
Return values
string

        
On this page

Search results