Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Stats Tables Cleaner Bundle Laravel Package

d3nysm/stats-tables-cleaner-bundle

View on GitHub
Deep Wiki
Context7

The StatsTablesCleanerBundle

This bundle helps with cleaning tables with statistics, logs, etc. The necessary thing is an entity must have date or datetime column.

Installation

$ composer require d3nysm/stats-tables-cleaner-bundle

Quick Start

  1. Add the notation to your entity:

    use App\Repository\StatsEntryRepository;
    use Doctrine\ORM\Mapping as ORM;
    use D3nysm\Bundle\StatsTablesCleaner\Annotation\CleanOldData;
    
    /**
     * @ORM\Entity(repositoryClass=StatsEntryRepository::class)
     * @ORM\Table(indexes={
     *     @ORM\Index(name="stat_date", columns={"date"})})
     * @CleanOldData(interval="-3 month")
    */
    class StatsEntry
    

    Full settings of the annotation:

    /**
     * @DeleteOldData(dateProp="createdAt", interval="-1 month", batchSize=500, eventName="app.my_best_event")
    */
    
  2. Run the command and add to you scheduler system:

    $ php bin/console stats-tables-cleaner:clean
    
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge