lasthourcloud/app/Livewire/Project/Database/BackupNow.php
2024-06-10 20:43:34 +00:00

20 lines
389 B
PHP

<?php
namespace App\Livewire\Project\Database;
use App\Jobs\DatabaseBackupJob;
use Livewire\Component;
class BackupNow extends Component
{
public $backup;
public function backup_now()
{
dispatch(new DatabaseBackupJob(
backup: $this->backup
));
$this->dispatch('success', 'Backup queued. It will be available in a few minutes.');
}
}