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
Class or file | Line |
---|---|
Winter\Storm\Database\Relations\Concerns\BelongsOrMorphsToMany
|
229 |
Copyright © 2024 Winter CMS