/** * Ask question about backup id * * @return bool */ private function askBackupId() { $backups = BackupModel::all(); if (!$backups) { $this->info(trans('renatio.backupmanager::lang.restore.no_backups')); return false; } $backupId = $this->getBackupIdOption($backups); if (!BackupModel::find($backupId)) { $this->error(trans('renatio.backupmanager::lang.restore.backup_not_exist')); return false; } $this->input->setOption('backup-id', $backupId); return true; }
/** * Delete checked backups * * @param $checkedIds */ private function deleteCheckedBackups($checkedIds) { foreach ($checkedIds as $backupId) { if (!($backup = Backup::find($backupId))) { continue; } $backup->delete(); } Flash::success(trans('renatio.backupmanager::lang.backups.delete_selected_success')); }