From 41664fd4b635d6636d4beef71fbbc9e265f92ab3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 7 Aug 2024 16:13:12 -0500 Subject: [PATCH] Update BelongsTo.php --- .../Database/Eloquent/Relations/BelongsTo.php | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php b/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php index 5eff85132424..353103614466 100755 --- a/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php +++ b/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php @@ -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. * @@ -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 = ['*']) {