trait CanGetStateFromRelationships (View source)

Methods

bool
hasRelationship(Model $record)

No description

Relation|null
getRelationship(Model $record, string|null $statePath = null)

No description

array
getRelationshipResults(Model $record, array|null $relationships = null)

No description

string
getRelationshipAttribute(string|null $statePath = null)

No description

string|null
getRelationshipName(string|null $statePath = null)

No description

Details

bool hasRelationship(Model $record)

No description

Parameters

Model $record

Return Value

bool

Relation|null getRelationship(Model $record, string|null $statePath = null)

No description

Parameters

Model $record
string|null $statePath

Return Value

Relation|null

array getRelationshipResults(Model $record, array|null $relationships = null)

No description

Parameters

Model $record
array|null $relationships

Return Value

array

string getRelationshipAttribute(string|null $statePath = null)

No description

Parameters

string|null $statePath

Return Value

string

string|null getRelationshipName(string|null $statePath = null)

No description

Parameters

string|null $statePath

Return Value

string|null