From 1084c25bdc3849565abdfaea0d1845c8b24083d3 Mon Sep 17 00:00:00 2001 From: Tom Witkowski Date: Fri, 13 Mar 2020 13:49:59 +0100 Subject: [PATCH] add withoutLogs to docs --- docs/advanced-usage/disabling-logging.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/advanced-usage/disabling-logging.md b/docs/advanced-usage/disabling-logging.md index 82e6ad85..7e7fff62 100644 --- a/docs/advanced-usage/disabling-logging.md +++ b/docs/advanced-usage/disabling-logging.md @@ -10,3 +10,15 @@ activity()->disableLogging(); ``` If you want to enable logging again call `activity()->enableLogging()`. + +## without Logs + +If you want to run a given code snippet without logs you can use the `withoutLogs()` method. + +```php +activity()->withoutLogs(function(){ + // ... +}); +``` + +Everything that would produce an activitylog (model events, explicit calls) won't save an activity.