����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 18.117.180.237 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gltevjme/./bofirmacademy.com/vendor/spatie/laravel-backup/src/Commands/ |
Upload File : |
<?php namespace Spatie\Backup\Commands; use Exception; use Spatie\Backup\BackupDestination\BackupDestinationFactory; use Spatie\Backup\Events\CleanupHasFailed; use Spatie\Backup\Tasks\Cleanup\CleanupJob; use Spatie\Backup\Tasks\Cleanup\CleanupStrategy; class CleanupCommand extends BaseCommand { /** @var string */ protected $signature = 'backup:clean {--disable-notifications}'; /** @var string */ protected $description = 'Remove all backups older than specified number of days in config.'; protected CleanupStrategy $strategy; public function __construct(CleanupStrategy $strategy) { parent::__construct(); $this->strategy = $strategy; } public function handle() { consoleOutput()->comment('Starting cleanup...'); $disableNotifications = $this->option('disable-notifications'); try { $config = config('backup'); $backupDestinations = BackupDestinationFactory::createFromArray($config['backup']); $cleanupJob = new CleanupJob($backupDestinations, $this->strategy, $disableNotifications); $cleanupJob->run(); consoleOutput()->comment('Cleanup completed!'); } catch (Exception $exception) { if (! $disableNotifications) { event(new CleanupHasFailed($exception)); } return 1; } } }