We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7eeae6 commit 678e24cCopy full SHA for 678e24c
src/NodeTrait.php
@@ -49,10 +49,9 @@ public static function bootNodeTrait()
49
50
static::deleting(function ($model) {
51
// We will need fresh data to delete node safely
52
+ // We must delete the descendants BEFORE we delete the actual
53
+ // album to avoid failing FOREIGN key constraints.
54
$model->refreshNode();
- });
-
55
- static::deleted(function ($model) {
56
$model->deleteDescendants();
57
});
58
0 commit comments