ComparesRelatedModels
trait ComparesRelatedModels
Methods
bool
mixed
getParentKey()
Get the value of the parent model's key.
mixed
bool
compareKeys(mixed $parentKey, mixed $relatedKey)
Compare the parent key with the related key.
Details
at line 16
bool
is(Model|null $model)
Determine if the model is the related instance of the relationship.
at line 35
bool
isNot(Model|null $model)
Determine if the model is not the related instance of the relationship.
at line 43
abstract mixed
getParentKey()
Get the value of the parent model's key.
at line 48
abstract protected mixed
getRelatedKeyFrom(Model $model)
Get the value of the model's related key.
at line 53
protected bool
compareKeys(mixed $parentKey, mixed $relatedKey)
Compare the parent key with the related key.