Skip to content

Commit 0933309

Browse files
use getTouchedRelations when touching owners (#34100)
This allows overriding getTouchedRelations
1 parent caec40e commit 0933309

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ public function joiningTableSegment()
682682
*/
683683
public function touches($relation)
684684
{
685-
return in_array($relation, $this->touches);
685+
return in_array($relation, $this->getTouchedRelations());
686686
}
687687

688688
/**
@@ -692,7 +692,7 @@ public function touches($relation)
692692
*/
693693
public function touchOwners()
694694
{
695-
foreach ($this->touches as $relation) {
695+
foreach ($this->getTouchedRelations() as $relation) {
696696
$this->$relation()->touch();
697697

698698
if ($this->$relation instanceof self) {

0 commit comments

Comments
 (0)