/** * Constrains the relationship content to the applicable rows on the related model * * @return object * @since 2.0.0 **/ public function constrain() { return $this->related->whereEquals($this->relatedKey, $this->model->{$this->localKey}); }
/** * Constrains the relationship content to the applicable rows on the related model * * @return object * @since 2.0.0 **/ public function constrain() { return $this->related->whereEquals($this->relatedKey, $this->model->{$this->localKey}); }