Skip to content

Commit 65af246

Browse files
committed
Update user-monitoring.php
1 parent b8dd238 commit 65af246

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

config/user-monitoring.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,26 @@
9898
* Determines whether to store `visits` even when the user is not logged in.
9999
*/
100100
'guest_mode' => true,
101+
102+
/*
103+
| Here you can define one or more conditions that determine whether a visit
104+
| should be logged. Each condition must return a boolean (true = log visit,
105+
| false = skip logging).
106+
|
107+
| All conditions are evaluated before monitoring. If any condition returns
108+
| false, the visit will NOT be recorded.
109+
|
110+
| Supported formats:
111+
|
112+
| 1. Class name (must implement MonitoringCondition interface):
113+
| \App\Monitoring\YourCustomCondition::class
114+
|
115+
| 2. Closure / callback (receives the current Request and authenticated user):
116+
| function (Request $request, $user) {
117+
| return $user && $user->isAdmin();
118+
| }
119+
*/
120+
'conditions' => [],
101121
],
102122

103123
/*

0 commit comments

Comments
 (0)