model.beforeUpdate

Called before the model is updated

Note: also triggered in Winter\Storm\Halcyon\Model

Example usage:

$model->bindEvent('model.beforeUpdate', function () use (\Winter\Storm\Database\Model $model) { if (!$model->isValid()) { throw new \Exception("Invalid Model!"); } });

Usage

Triggers

Class or file Line
Winter\Storm\Database\Model 339
Copyright © 2024 Winter CMS