Beautiful Open-Source Form Builder
Add cascading delete for Form integrations on deletion
JhumanJ6bebb614c6d4
diff --git a/api/app/Models/Forms/Form.php b/api/app/Models/Forms/Form.phpindex cb6ec2030..79acfeffd 100644--- a/api/app/Models/Forms/Form.php+++ b/api/app/Models/Forms/Form.php@@ -328,4 +328,11 @@ class Form extends Model implements CachableAttributes{return FormFactory::new();}++ public static function booted(): void+ {+ static::deleted(function (Form $form) {+ $form->integrations()->delete();+ });+ }}