src/mako/database/midgard/traits/TimestampedTrait.php
protected function touchRelated(): void
	{
		foreach($this->getRelationsToTouch() as $touch)
		{
			$touch = explode('.', $touch);

			$relation = $this->{array_shift($touch)}();

			foreach($touch as $nested)
			{
				$related = $relation->first();

				if($related === false)
				{
					continue 2;
				}

				$relation = $related->$nested();
			}

			$relation->update([$relation->getModel()->getUpdatedAtColumn() => null]);
		}
	}
protected function touchRelated(): void
	{
		foreach($this->getRelationsToTouch() as $touch)
		{
			$touch = explode('.', $touch);

			$relation = $this->{array_shift($touch)}();

			foreach($touch as $nested)
			{
				$related = $relation->first();

				if($related === false)
				{
					continue 2;
				}

				$relation = $related->$nested();
			}

			$relation->update([$relation->getModel()->getUpdatedAtColumn() => null]);
		}
	}
protected function touchRelated ( ) : void { foreach ( $ this -> getRelationsToTouch ( ) as $ touch ) { $ touch = explode ( '.' , $ touch ) ; $ relation = $ this -> { array_shift ( $ touch ) } ( ) ; foreach ( $ touch as $ nested ) { $ related = $ relation -> first ( ) ; if ( $ related === false ) { continue 2 ; } $ relation = $ related -> $ nested ( ) ; } $ relation -> update ( [ $ relation -> getModel ( ) -> getUpdatedAtColumn ( ) => null ] ) ; } }
Touches related records.
Touches related records .