trait
Illuminate
/
Database
/
Eloquent
/
Relations
/
Concerns
/
ComparesRelatedModels
You are viewing an older version of the documentation. For the latest, please visit master documentation.
ComparesRelatedModels
Methods
public
is ( $model ) : bool
Determine if the model is the related instance of the relationship.
Parameters
- $model Model |null
public
isNot ( $model ) : bool
Determine if the model is not the related instance of the relationship.
Parameters
- $model Model |null
public
abstract
getParentKey ( ) : mixed
Get the value of the parent model's key.
protected
abstract
getRelatedKeyFrom ( Model $model ) : mixed
Get the value of the model's related key.
Parameters
- $model Model
protected
compareKeys ( $parentKey , $relatedKey ) : bool
Compare the parent key with the related key.
Parameters
- $parentKey mixed
- $relatedKey mixed