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 15
bool
is(Model|null $model)
Determine if the model is the related instance of the relationship.
at line 34
bool
isNot(Model|null $model)
Determine if the model is not the related instance of the relationship.
at line 42
abstract mixed
getParentKey()
Get the value of the parent model's key.
at line 47
abstract protected mixed
getRelatedKeyFrom(Model $model)
Get the value of the model's related key.
at line 52
protected bool
compareKeys(mixed $parentKey, mixed $relatedKey)
Compare the parent key with the related key.