lasthourcloud/app/Livewire/Project/Database/BackupNow.php

19 lines
388 B
PHP
Raw Normal View History

2023-08-11 18:48:52 +00:00
<?php
2023-12-07 18:06:32 +00:00
namespace App\Livewire\Project\Database;
2023-08-11 18:48:52 +00:00
use App\Jobs\DatabaseBackupJob;
use Livewire\Component;
class BackupNow extends Component
{
public $backup;
public function backup_now()
{
dispatch(new DatabaseBackupJob(
backup: $this->backup
));
2023-12-07 18:06:32 +00:00
$this->dispatch('success', 'Backup queued. It will be available in a few minutes.');
2023-08-11 18:48:52 +00:00
}
}