From c5a7f00db2e15b72594480dde427b052d959ffc9 Mon Sep 17 00:00:00 2001 From: David Katalinic <85836822+DaveXo9@users.noreply.github.com> Date: Thu, 8 Feb 2024 00:18:58 +0100 Subject: [PATCH] Deleting CF values when the CF is deleted (#91) Co-authored-by: David --- src/App/Models/CustomField.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/App/Models/CustomField.php b/src/App/Models/CustomField.php index 5c90af3..ff5eb59 100644 --- a/src/App/Models/CustomField.php +++ b/src/App/Models/CustomField.php @@ -65,6 +65,7 @@ protected static function booted() static::deleted(function (self $customField) { $customField->parent()->delete(); $customField->children()->delete(); + $customField->values()->delete(); }); static::saving(function (self $customField) {