Description
Add a new Artisan command to delete old reports from the database.
Why It Matters
Currently, deletion is only possible via schedule()->daily() in the host application. This creates unnecessary coupling and makes testing or ad-hoc usage less convenient.
Command
php artisan reporting:purge
Options
It would be helpful to support the following options:
--days=30 – Manually specify the report age in days (default can be 30)
--dry-run – Show how many reports would be deleted, without actually deleting anything
Benefits
- Can be run from CRON, CI/CD, or manually
- Helps during testing or one-off maintenance tasks
- No need to add logic to
App\Console\Kernel.php
Want to help? Fork the repo and open a PR. Questions are welcome in the comments!
Description
Add a new Artisan command to delete old reports from the database.
Why It Matters
Currently, deletion is only possible via
schedule()->daily()in the host application. This creates unnecessary coupling and makes testing or ad-hoc usage less convenient.Command
php artisan reporting:purgeOptions
It would be helpful to support the following options:
--days=30– Manually specify the report age in days (default can be 30)--dry-run– Show how many reports would be deleted, without actually deleting anythingBenefits
App\Console\Kernel.phpWant to help? Fork the repo and open a PR. Questions are welcome in the comments!