use method touch in CategoryObserver
This commit is contained in:
parent
8f010045e7
commit
1d9892699d
|
|
@ -27,11 +27,7 @@ class CategoryObserver
|
|||
public function saved($category)
|
||||
{
|
||||
foreach ($category->children as $child) {
|
||||
// Hacky trick to make this method unit-testable (instead of $child->touch()
|
||||
// as the unit test is too fast)
|
||||
$child->setUpdatedAt(Carbon::now()->addSecond());
|
||||
|
||||
$child->save();
|
||||
$child->touch();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue