model.beforeDelete

Triggered in October\Rain\Database\Model.

Called before the model is deleted

Example usage:

$model->bindEvent('model.beforeDelete', function () use (\October\Rain\Database\Model $model) {
    if (!$model->isAllowedToBeDeleted()) {
        throw new \Exception("You cannot delete me!");
    }
});