public static function clearBackups()
    {
        try {
            $config = config('laravel-backup');

            $backupDestinations = BackupDestinationFactory::createFromArray($config['backup']);

            $strategy = app($config['cleanup']['strategy']);

            $disableNotification = false; // TODO: Create a config for this

            (new CleanupJob($backupDestinations, $strategy, $disableNotification))->run();
        }
        catch (\Exception $ex) {
            return false;
        }

        return true;
    }
public static function clearBackups()
    {
        try {
            $config = config('laravel-backup');

            $backupDestinations = BackupDestinationFactory::createFromArray($config['backup']);

            $strategy = app($config['cleanup']['strategy']);

            $disableNotification = false; // TODO: Create a config for this

            (new CleanupJob($backupDestinations, $strategy, $disableNotification))->run();
        }
        catch (\Exception $ex) {
            return false;
        }

        return true;
    }
public static function clearBackups ( ) { try { $ config = config ( 'laravel-backup' ) ; $ backupDestinations = BackupDestinationFactory :: createFromArray ( $ config [ 'backup' ] ) ; $ strategy = app ( $ config [ 'cleanup' ] [ 'strategy' ] ) ; $ disableNotification = false ; // TODO: Create a config for this ( new CleanupJob ( $ backupDestinations , $ strategy , $ disableNotification ) ) -> run ( ) ; } catch ( \ Exception $ ex ) { return false ; } return true ; }
Clean the backups.

@return bool
Clean the backups .