Skip to content

Feature: Artisan Command to Purge Old Reports #2

@2177866

Description

@2177866

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!

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions