Documentation

ModelOwnership

ModelOwnership

Table of Contents

belongsToModel()  : bool
Is a Model the owner of this Model?
hasOwner()  : bool
Does the model have an owner?
owner()  : MorphTo
Owner relation.
setOwner()  : $this
Set the owner of the model if new.

Methods

belongsToModel()

Is a Model the owner of this Model?

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

hasOwner()

Does the model have an owner?

public hasOwner() : bool
Return values
bool

owner()

Owner relation.

public owner() : MorphTo
Return values
MorphTo

setOwner()

Set the owner of the model if new.

public setOwner(Model $owner) : $this
Parameters
$owner : Model
Return values
$this

Search results