model.afterSave

Called after the model is saved

Note: This is called both when creating and updating and is also triggered in Winter\Storm\Halcyon\Model

Example usage:

$model->bindEvent('model.afterSave', function () use (\Winter\Storm\Database\Model $model) { if ($model->title !== $model->original['title']) { \Log::info("{$model->name} updated its title!"); } });

Usage

Globally

use Event;

Event::listen('model.afterSave', function () {
    // Your event listener code goes here...
});

Triggers

Class or file Line
Winter\Storm\Database\Model 349
Copyright © 2023 Winter CMS