PHP code example of matthewkp / ez-clean-up-versions

1. Go to this page and download the library: Download matthewkp/ez-clean-up-versions library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

matthewkp / ez-clean-up-versions example snippets


// app/AppKernel.php

class AppKernel extends Kernel
{
    ...
    public function registerBundles()
    {
        ...
        $bundles = [
            ...
            new Matthewkp\EzCleanUpVersionsBundle\MatthewkpEzCleanUpVersionsBundle(),
            ...
        ];
        ...
    }
}

// /etc/cron.d/<your_cron_file> or /var/spool/cron/apache
0 0 * * * <user> cd <your_site_path> && php bin/console matthewkp:ez-clean-up-versions --env=<ENV> > 2>&1