Skip to content

Commit 06541cf

Browse files
committed
Update user-monitoring.php
1 parent 6de5cfa commit 06541cf

File tree

1 file changed

+53
-41
lines changed

1 file changed

+53
-41
lines changed

config/user-monitoring.php

Lines changed: 53 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,102 +2,111 @@
22

33
return [
44
/*
5-
* Configurations.
5+
* Main configuration settings for the package.
66
*/
77
'config' => [
88
'routes' => [
9+
/*
10+
* Path to the route file that handles user monitoring routes.
11+
*/
912
'file_path' => 'routes/user-monitoring.php',
1013
],
1114
],
1215

1316
/*
14-
* User properties.
17+
* User-specific configuration settings.
1518
*
16-
* You can customize the user guard, table, foreign key, and ...
19+
* Customize various aspects related to the user model, including the guard, table, foreign key, and display attributes.
1720
*/
1821
'user' => [
1922
/*
20-
* User model.
23+
* Specify the fully qualified class name of the user model.
2124
*/
2225
'model' => 'App\Models\User',
2326

2427
/*
25-
* Foreign Key column name.
28+
* Name of the foreign key column linking user data to other models.
2629
*/
2730
'foreign_key' => 'user_id',
2831

2932
/*
30-
* Users table name.
33+
* Name of the table storing user data.
3134
*/
3235
'table' => 'users',
3336

3437
/*
35-
* You can customize which guards are used to authenticate or
36-
* store user data across different parts of the application. Each guard
37-
* will be checked independently, allowing users to be authenticated by
38-
* multiple guards and enabling more flexible user management.
39-
*
40-
* Make sure that each guard is properly configured under the 'guards' section in the auth.php config file.
38+
* Defines the authentication guards used for verifying the user.
39+
* Multiple guards can be specified for flexible authentication strategies.
40+
* Ensure these guards are configured correctly in the 'guards' section of the auth.php config file.
4141
*/
4242
'guards' => ['web'],
4343

4444
/*
45-
* If you are using uuid or ulid you can change it for the type of foreign_key.
46-
*
47-
* When using ulid or uuid, you need to add related traits into the models.
45+
* Specify the type of foreign key being used (e.g., 'id', 'uuid', 'ulid').
46+
* For non-standard IDs, make sure to add the relevant traits to your models.
4847
*/
49-
'foreign_key_type' => 'id', // uuid, ulid, id
48+
'foreign_key_type' => 'id', // Options: uuid, ulid, id
5049

5150
/*
52-
* If you want to display a custom username, you can create your attribute in User and change this value.
51+
* Attribute of the user model used to display the user's name.
52+
* If you wish to use a different attribute (e.g., username), change this value accordingly.
5353
*/
5454
'display_attribute' => 'name',
5555
],
5656

5757
/*
58-
* Visit monitoring configurations.
58+
* Configuration settings for visit monitoring.
5959
*/
6060
'visit_monitoring' => [
61+
/*
62+
* The table where visit data will be stored.
63+
*/
6164
'table' => 'visits_monitoring',
6265

6366
/*
64-
* If you want to disable visit monitoring, set it to false.
67+
* Enable or disable the visit monitoring feature.
68+
* Set to false to disable tracking of user visits.
6569
*/
6670
'turn_on' => true,
6771

6872
/*
69-
* If you want to disable visit monitoring in Ajax mode, set it to false.
73+
* Enable or disable monitoring for AJAX requests.
74+
* Set to false if you do not wish to track AJAX-based page loads.
7075
*/
7176
'ajax_requests' => true,
7277

7378
/*
74-
* You can specify pages not to be monitored.
79+
* List of pages that should be excluded from visit monitoring.
80+
* Add route names or URL paths to this array if you want to exclude certain pages.
7581
*/
7682
'except_pages' => [
77-
'user-monitoring/visits-monitoring',
78-
'user-monitoring/actions-monitoring',
79-
'user-monitoring/authentications-monitoring',
83+
'user-monitoring/visits-monitoring',
84+
'user-monitoring/actions-monitoring',
85+
'user-monitoring/authentications-monitoring',
8086
],
8187

8288
/*
83-
* If you want to delete visit rows after some days, you can change this to 360 for example,
84-
* but if you don't like to delete rows you can change it to 0.
89+
* Set the number of days after which visit records should be automatically deleted.
90+
* Set to 0 to disable automatic deletion.
8591
*
86-
* For this feature you need Task-Scheduling => https://laravel.com/docs/10.x/scheduling
92+
* To enable automatic deletion, configure Laravel's task scheduling as outlined here:
93+
* https://laravel.com/docs/10.x/scheduling
8794
*/
8895
'delete_days' => 0,
8996
],
9097

9198
/*
92-
* Action monitoring configurations.
99+
* Configuration settings for action monitoring.
93100
*/
94101
'action_monitoring' => [
102+
/*
103+
* The table where action data (e.g., store, update, delete) will be stored.
104+
*/
95105
'table' => 'actions_monitoring',
96106

97107
/*
98-
* Monitor actions.
99-
*
100-
* You can set true/false for monitor actions like (store, update, and ...).
108+
* Enable or disable monitoring of specific actions (e.g., store, update, delete).
109+
* Set to true to monitor actions or false to disable.
101110
*/
102111
'on_store' => true,
103112
'on_update' => true,
@@ -106,28 +115,31 @@
106115
'on_restore' => false,
107116
'on_replicate' => false,
108117

109-
/**
110-
* Determines if the application should use reverse proxy headers to fetch the real client IP
111-
* If set to true, it will try to get the IP from the specified header (X-Real-IP or X-Forwarded-For)
112-
* This is useful when using reverse proxies like Nginx or Cloudflare.
118+
/*
119+
* If your application is behind a reverse proxy (e.g., Nginx or Cloudflare),
120+
* enable this setting to fetch the real client IP from the proxy headers.
113121
*/
114122
'use_reverse_proxy_ip' => false,
115-
'real_ip_header' => 'X-Forwarded-For'
123+
124+
/*
125+
* The header used by reverse proxies to forward the real client IP.
126+
* Common values are 'X-Forwarded-For' or 'X-Real-IP'.
127+
*/
128+
'real_ip_header' => 'X-Forwarded-For',
116129
],
117130

118131
/*
119-
* Authentication monitoring configurations.
132+
* Configuration settings for authentication monitoring.
120133
*/
121134
'authentication_monitoring' => [
122-
'table' => 'authentications_monitoring',
123-
124135
/*
125-
* If you want to delete authentications-monitoring rows when the user is deleted from the users table you can set true or false.
136+
* If enabled, authentication records will be deleted when the associated user is deleted.
126137
*/
127138
'delete_user_record_when_user_delete' => true,
128139

129140
/*
130-
* You can set true/false for monitor login or logout.
141+
* Enable or disable monitoring of user login and logout events.
142+
* Set to true to track these actions, or false to disable.
131143
*/
132144
'on_login' => true,
133145
'on_logout' => true,

0 commit comments

Comments
 (0)