From 377ddf9c86450b0fe360acc1e6c87e0f47c1f468 Mon Sep 17 00:00:00 2001 From: Shahboz <43272443+ShahbozHalim@users.noreply.github.com> Date: Wed, 17 Mar 2021 15:12:12 +0500 Subject: [PATCH 1/2] set define audit_exclude --- config/audit.php | 14 ++++++++++++++ src/Auditable.php | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/config/audit.php b/config/audit.php index 3d37b9a6..1d873487 100644 --- a/config/audit.php +++ b/config/audit.php @@ -63,6 +63,20 @@ 'restored', ], + /* + |-------------------------------------------------------------------------- + | Strict Mode + |-------------------------------------------------------------------------- + | + | Define the audit_exclude + | + */ + + 'audit_exclude' => [ + //if the table has an index Userstamps created_by, updated_by_id + ], + + /* |-------------------------------------------------------------------------- | Strict Mode diff --git a/src/Auditable.php b/src/Auditable.php index 820083d9..038f72d5 100644 --- a/src/Auditable.php +++ b/src/Auditable.php @@ -504,7 +504,7 @@ public function getAuditInclude(): array */ public function getAuditExclude(): array { - return $this->auditExclude ?? []; + return $this->auditExclude ?? Config::get('audit.audit_exclude', []); } /** From 62b69cef60ce1e9ddef10ea6fc146847edf06208 Mon Sep 17 00:00:00 2001 From: Shahboz <43272443+ShahbozHalim@users.noreply.github.com> Date: Wed, 17 Mar 2021 17:49:27 +0500 Subject: [PATCH 2/2] fix comment --- config/audit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/audit.php b/config/audit.php index 1d873487..dee52725 100644 --- a/config/audit.php +++ b/config/audit.php @@ -73,7 +73,7 @@ */ 'audit_exclude' => [ - //if the table has an index Userstamps created_by, updated_by_id + //example: if the tables has an userstamps, created_by, updated_by_id... ],