Documentation

HasOwner

HasOwner

Table of Contents

$model  : Model|null
$owner  : Model
$owner_id  : int
$owner_type  : class-string
belongsToModel()  : bool
hasOwner()  : bool
morphTo()  : MorphTo
Define a polymorphic, inverse one-to-one or many relationship.
owner()  : MorphTo
setOwner()  : static

Properties

$owner_type

public class-string $owner_type

Methods

belongsToModel()

public belongsToModel(Model $model) : bool
Parameters
$model : Model
Tags
inheritDoc
Return values
bool

hasOwner()

public hasOwner() : bool
Tags
inheritDoc
Return values
bool

morphTo()

Define a polymorphic, inverse one-to-one or many relationship.

public abstract morphTo([string|null $name = null ][, string|null $type = null ][, string|null $id = null ][, string|null $ownerKey = null ]) : MorphTo
Parameters
$name : string|null = null
$type : string|null = null
$id : string|null = null
$ownerKey : string|null = null
Tags
noinspection

PhpMissingReturnTypeInspection

Return values
MorphTo

owner()

public owner() : MorphTo
Tags
inheritDoc
Return values
MorphTo

setOwner()

public setOwner(Model $owner) : static
Parameters
$owner : Model
Tags
inheritDoc
Return values
static

Search results