DataTables Editor Event Hooks

In addition to Laravel's model events, DataTables Editor offers some pre & post event hooks.

Create Events

Create action has the following event hooks:

To use the event hook, just add the methods on your editor class.

public function creating(Model $model, array $data) {
    return $data;
}

public function created(Model $model, array $data) {
    return $data;
}

Edit Events

Edit action has the following event hooks:

To use the event hook, just add the methods on your editor class.

public function updating(Model $model, array $data) {
    return $data;
}

public function updated(Model $model, array $data) {
    return $data;
}

Remove Events

Remove action has the following event hooks:

To use the event hook, just add the methods on your editor class.

public function deleting(Model $model, array $data) {
    return $data;
}

public function deleted(Model $model, array $data) {
    return $data;
}