2023-08-10 13:52:54 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Livewire\Project\Database;
|
|
|
|
|
|
|
|
use App\Models\ScheduledDatabaseBackupExecution;
|
|
|
|
use Livewire\Component;
|
|
|
|
|
|
|
|
class BackupExecution extends Component
|
|
|
|
{
|
|
|
|
public ScheduledDatabaseBackupExecution $execution;
|
|
|
|
|
|
|
|
public function download()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public function delete(): void
|
|
|
|
{
|
|
|
|
delete_backup_locally($this->execution->filename, $this->execution->scheduledDatabaseBackup->database->destination->server);
|
|
|
|
$this->execution->delete();
|
2023-08-17 13:30:15 +00:00
|
|
|
$this->emit('success', 'Backup deleted successfully.');
|
2023-08-10 13:52:54 +00:00
|
|
|
$this->emit('refreshBackupExecutions');
|
|
|
|
}
|
|
|
|
}
|