model.relation.detach

Triggered in October\Rain\Database\Relations\BelongsToMany.

Called after removing a relation between models (only for BelongsToMany relation)

Example usage:

$model->bindEvent('model.relation.detach', function (string $relationName, ?array $parsedIds, int $results) use (\October\Rain\Database\Model $model) {
    foreach ($ids as $id) {
        traceLog("Relation {$relationName} was removed", (array) $parsedIds);
    }
});