You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After publishing, run `php artisan migrate` command.
67
+
After publishing, run the `php artisan migrate` command.
68
68
69
69
<aname="user-configuration"></a>
70
70
## User Configuration
71
71
72
-
You can config your user with `user-monitoring.php` configuration file:
72
+
You can config your user with the `user-monitoring.php` configuration file:
73
73
74
74
```php
75
75
'user' => [
@@ -94,18 +94,18 @@ You can config your user with `user-monitoring.php` configuration file:
94
94
'guard' => 'web',
95
95
96
96
/*
97
-
* If you are using uuid or ulid you can change it for type of foreign_key.
97
+
* If you are using uuid or ulid you can change it for the type of foreign_key.
98
98
*
99
-
* When you are using ulid or uuid, you need to add related trait into the models.
99
+
* When you are using ulid or uuid, you need to add related traits into the models.
100
100
*/
101
101
'foreign_key_type' => 'id', // uuid, ulid, id
102
102
],
103
103
```
104
104
105
-
-`model`: If your user model is exists in another place, you can change it to correct namespace.
105
+
-`model`: If your user model exists in another place, you can change it to the correct namespace.
106
106
-`foreign_key`: You can set the user foreign_key name, like `customer_id`.
107
107
-`table`: You can write your users table name if is not `users.
108
-
-`guard`: The correct guard that using for user.
108
+
-`guard`: The correct guard that using for the user.
109
109
110
110
<aname="foreign-key-type-uuid-ulid-id"></a>
111
111
### Foreign Key Type (UUID, ULID, ID)
@@ -117,9 +117,9 @@ If you are using `uuid` or `ulid`, you can change `foreign_key_type` to your cor
117
117
...
118
118
119
119
/*
120
-
* If you are using uuid or ulid you can change it for type of foreign_key.
120
+
* If you are using uuid or ulid you can change it for the type of foreign_key.
121
121
*
122
-
* When you are using ulid or uuid, you need to add related trait into the models.
122
+
* When you are using ulid or uuid, you need to add related traits into the models.
123
123
*/
124
124
'foreign_key_type' => 'uuid', // uuid, ulid, id
125
125
],
@@ -134,19 +134,25 @@ When you want to monitor all views of your application, you must follow below:
134
134
135
135
1. Publish the [Migrations](#publish)
136
136
137
-
2. Use `VisitMonitoringMiddleware` in Kernel.php, you can go to `App/Http` folder and open the `Kernel.php` file and add `VisitMonitoringMiddleware` into your middleware for example:
137
+
2. Use `VisitMonitoringMiddleware` in Kernel.php, you can go to the `App/Http` folder and open the `Kernel.php` file and add `VisitMonitoringMiddleware` into your middleware for example:
If you want to disable monitoring for specific pages you can go to `user-monitoring.php` that exists in `config` folder and add pages into `visit_monitoring` key:
155
+
If you want to disable monitoring for specific pages you can go to `user-monitoring.php` that exists in the `config` folder and add pages into the`visit_monitoring` key:
150
156
151
157
```php
152
158
'visit_monitoring' => [
@@ -163,25 +169,25 @@ If you want to disable monitoring for specific pages you can go to `user-monitor
### Delete Visit Monitoring Records By Specific Days
165
171
166
-
You may to delete records by specific days, Laravel-User-Monitoring also support this 🤩.
172
+
You may delete records by specific days, Laravel-User-Monitoring also supports this 🤩.
167
173
168
-
First, you need go to `user-monitoring` config file and highlighting the days that you want to delete:
174
+
First, you need to go to the `user-monitoring` config file and highlight the days that you want to delete:
169
175
170
176
```php
171
177
'visit_monitoring' => [
172
178
...
173
179
174
180
/*
175
-
* If you want to delete visit rows after some days, you can change this like 360,
176
-
* but you don't like to delete rows you can change it to 0.
181
+
* If you want to delete visit rows after some days, you can change this to 360,
182
+
* but if you don't like to delete rows you can change it to 0.
177
183
*
178
184
* For this feature you need Task-Scheduling => https://laravel.com/docs/10.x/scheduling
179
185
*/
180
186
'delete_days' => 10,
181
187
],
182
188
```
183
189
184
-
After, you need to use [Task Scheduling](https://laravel.com/docs/10.x/scheduling) to firerelated command, so go to `app/Console/Kernel.php` and do like this:
190
+
After, you need to use [Task Scheduling](https://laravel.com/docs/10.x/scheduling) to fire-related command, so go to `app/Console/Kernel.php` and do like this:
185
191
186
192
```php
187
193
<?php
@@ -208,7 +214,7 @@ You can change `hourly` to `minute` or `second`, for more information you can re
208
214
<aname="turn-on-off"></a>
209
215
### Turn ON-OFF
210
216
211
-
Maybe you want to turn off visit monitoring for somedays or always, you can use configuration to turn off:
217
+
Maybe you want to turn off visit monitoring for somedays or always, you can use configuration to turn it off:
212
218
213
219
```php
214
220
'visit_monitoring' => [
@@ -226,7 +232,7 @@ Maybe you want to turn off visit monitoring for somedays or always, you can use
226
232
<aname="action-monitoring"></a>
227
233
## Action Monitoring
228
234
229
-
If you want to monitor your models actions, you can use `Actionable` trait into your model:
235
+
If you want to monitor your models actions, you can use the `Actionable` trait in your model:
230
236
231
237
```php
232
238
<?php
@@ -242,9 +248,9 @@ class Product extends Model
242
248
}
243
249
```
244
250
245
-
Now when a product readed, created, updated or deleted, you can see which users doing that.
251
+
Now when a product is read, created, updated, or deleted, you can see which users doing that.
246
252
247
-
If you want to disable some action like created, you can use config file:
253
+
If you want to disable some actions like created, you can use the config file:
248
254
249
255
```php
250
256
'action_monitoring' => [
@@ -268,7 +274,7 @@ If you want to disable some action like created, you can use config file:
268
274
## Authentication Monitoring
269
275
270
276
Have you ever thought about monitoring the entry and exit of users of your application? Now you can :) <br>
271
-
If you want to monitor users when login or logout in your application, you need migrate the migrations and go to config file and change true for monitoring authentication.
277
+
If you want to monitor users when login or logout of your application, you need to migrate the migrations and go to the config file and change true for monitoring authentication.
0 commit comments