Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] Add replicate event to ActionMonitoring #36

Merged
merged 3 commits into from
Apr 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add replicate event
milwad-dev committed Apr 11, 2024
commit 7184ef47e8f03639a43595608efba1d17a3052bc
2 changes: 1 addition & 1 deletion config/user-monitoring.php
Original file line number Diff line number Diff line change
@@ -92,7 +92,7 @@
'on_destroy' => true,
'on_read' => true,
'on_restore' => false, // Release for next version :)
'on_replicate' => false, // Release for next version :)
'on_replicate' => false,
],

/*
10 changes: 5 additions & 5 deletions src/Traits/Actionable.php
Original file line number Diff line number Diff line change
@@ -39,11 +39,11 @@ protected static function boot(): void
});
}

// if (config('user-monitoring.action_monitoring.on_restore', false)) {
// static::restored(function (mixed $model) {
// static::insertActionMonitoring($model, ActionType::ACTION_RESTORED);
// });
// }TODO: Release next version
if (config('user-monitoring.action_monitoring.on_replicate', false)) {
static::replicating(function (mixed $model) {
static::insertActionMonitoring($model, ActionType::ACTION_REPLICATE);
});
}

// if (config('user-monitoring.action_monitoring.on_replicate', false)) {
// static::restored(function (mixed $model) {