trait Illuminate / Database / Eloquent / Relations / Concerns / ComparesRelatedModels

ComparesRelatedModels

Methods

public

is ( $model ) : bool

Determine if the model is the related instance of the relationship.

Parameters

public

isNot ( $model ) : bool

Determine if the model is not the related instance of the relationship.

Parameters

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

protected

compareKeys ( $parentKey , $relatedKey ) : bool

Compare the parent key with the related key.

Parameters

  • $parentKey mixed
  • $relatedKey mixed