From 0f552da7e2f936790f5e0bbe34f4fc083086fa0f Mon Sep 17 00:00:00 2001 From: Moamen Eltouny <16774083+RaggiTech@users.noreply.github.com> Date: Sun, 21 Nov 2021 09:35:23 +0200 Subject: [PATCH] Update Categorizable.php --- src/Traits/Categorizable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Traits/Categorizable.php b/src/Traits/Categorizable.php index 89ffb02..f5da83e 100644 --- a/src/Traits/Categorizable.php +++ b/src/Traits/Categorizable.php @@ -15,7 +15,7 @@ trait Categorizable */ public static function bootCategorizable() { - static::deleted(function (self $model) { + static::deleting(function (self $model) { $model->categories()->detach(); }); }