Skip to content

Commit 16ef0e0

Browse files
committed
Add readme note about pruning
1 parent 3fb88d4 commit 16ef0e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ $request->getUniqueId(); // Example: 94d0e2d6-4cc6-449c-9140-80bca47d29b4
126126
The number of logged requests can quickly grow if you are not pruning the logs regularly. In order to keep the logs manageable, you can use the `prune` command to remove old logs as [described in the Laravel Docs](https://laravel.com/docs/8.x/eloquent#pruning-models):
127127

128128
```php
129-
$schedule->command('model:prune', [
130-
'--model' => [\Bilfeldt\RequestLogger\Models\RequestLog::class],
131-
])->daily();
129+
$schedule->command('requestlog:prune')->daily();
132130
```
133131

132+
Note that the default `RequestLog` model setup by this package will not be discovered as a "Prunable" model by Laravel default `model:prune` command as it does not reside in the `app/Models` directory. If you change this class in the configuration to a custom class this will be auto registered and the command above will be needless.
133+
134134
## Testing
135135

136136
```bash

0 commit comments

Comments
 (0)