Skip to content

Commit

Permalink
Update BelongsTo.php
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell authored Aug 7, 2024
1 parent 37b15c1 commit 41664fd
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/Illuminate/Database/Eloquent/Relations/BelongsTo.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,6 @@ public function match(array $models, Collection $results, $relation)
return $models;
}

/**
* Touch all of the related models for the relationship.
*
* @return void
*/
public function touch()
{
if (! is_null($this->getParentKey())) {
parent::touch();
}
}

/**
* Associate the model instance to the given parent.
*
Expand Down Expand Up @@ -231,6 +219,18 @@ public function disassociate()
return $this->dissociate();
}

/**
* Touch all of the related models for the relationship.
*
* @return void
*/
public function touch()
{
if (! is_null($this->getParentKey())) {
parent::touch();
}
}

/** @inheritDoc */
public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*'])
{
Expand Down

0 comments on commit 41664fd

Please sign in to comment.