add some missing auto-deletes if refcount reaches zero

This commit is contained in:
2018-07-21 19:47:44 +02:00
parent a9ffd378a0
commit dc9acbf9d7
5 changed files with 43 additions and 1 deletions
+9
View File
@@ -25,6 +25,15 @@ class TableComment extends Model
{
use Reportable;
protected static function boot()
{
parent::boot();
static::deleting(function(TableComment $self) {
$self->reportsOf()->delete();
});
}
/** Context data table */
public function table()
{