From 6dea8df81e79534a7d0a686460f19d6faec9d0ab Mon Sep 17 00:00:00 2001 From: Josh Forbes Date: Thu, 5 Jan 2017 10:05:37 -0500 Subject: [PATCH] Do not let the endOrDelete method drop back into the observers as this could get us caught in a loop. --- src/Temporal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Temporal.php b/src/Temporal.php index 9e66e84..144f93b 100644 --- a/src/Temporal.php +++ b/src/Temporal.php @@ -207,7 +207,7 @@ protected function endOrDelete() } if ($this->isValid()) { - $this->update([ + $this->where($this->primaryKey, $this->{$this->primaryKey})->update([ 'valid_end' => Carbon::now() ]); }