model.relation.afterDetach

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

Example usage:

$model->bindEvent('model.relation.afterDetach', function (string $relationName, array $attachedIdList) use (\Winter\Storm\Database\Model $model) { traceLog("Relation {$relationName} was removed", $attachedIdList); });

Usage

Triggers

Copyright © 2024 Winter CMS