trait HasRelationship (View source)

Properties

protected Closure|null $modifyRelationshipQueryUsing
protected bool|Closure $isPreloaded
protected string|Closure|null $relationship
protected string|Closure|null $relationshipTitleAttribute

Methods

relationship(string|Closure|null $name, string|Closure|null $titleAttribute, Closure|null $modifyQueryUsing = null)

No description

preload(bool|Closure $condition = true)

No description

bool
isPreloaded()

No description

bool
queriesRelationships()

No description

Builder
getRelationship()

No description

string|null
getRelationshipName()

No description

string|null
Builder|null
getRelationshipQuery()

No description

string|null
getRelationshipKey(Builder|null $query = null)

No description

Details

HasRelationship relationship(string|Closure|null $name, string|Closure|null $titleAttribute, Closure|null $modifyQueryUsing = null)

No description

Parameters

string|Closure|null $name
string|Closure|null $titleAttribute
Closure|null $modifyQueryUsing

Return Value

HasRelationship

HasRelationship preload(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

HasRelationship

bool isPreloaded()

No description

Return Value

bool

bool queriesRelationships()

No description

Return Value

bool

Builder getRelationship()

No description

Return Value

Builder

string|null getRelationshipName()

No description

Return Value

string|null

string|null getRelationshipTitleAttribute()

No description

Return Value

string|null

Closure|null getModifyRelationshipQueryUsing()

No description

Return Value

Closure|null

Builder|null getRelationshipQuery()

No description

Return Value

Builder|null

string|null getRelationshipKey(Builder|null $query = null)

No description

Parameters

Builder|null $query

Return Value

string|null