{{ 'Pengaturan Database' }}

Pengaturan Database

Backup, restore, dan hapus data tabel pada aplikasi

Backup disimpan sebagai file SQL di storage/app/private/backups. File backup juga bisa di-import langsung ke MySQL via phpMyAdmin atau command line. Tabel users otomatis di-backup namun tidak dapat dihapus melalui menu ini agar akun login tetap aman.
{{-- ===== BACKUP ===== --}}

Backup Database

Simpan seluruh data aplikasi ke file backup

@csrf
@if ($backups->isNotEmpty())
@foreach ($backups as $b) @endforeach
File Ukuran Dibuat Aksi
{{ $b['name'] }} {{ number_format($b['size'] / 1024, 1) }} KB {{ \Illuminate\Support\Carbon::createFromTimestamp($b['modified'])->translatedFormat('d M Y H:i') }}
Unduh
@csrf
@csrf @method('DELETE')
@else
Belum ada file backup. Tekan "Buat Backup Sekarang" untuk membuat yang pertama.
@endif
{{-- ===== RESTORE ===== --}}

Restore Database

Unggah file backup (.sql) atau export MySQL untuk mengembalikan data

@csrf
@error('backup_file')

{{ $message }}

@enderror
{{-- ===== HAPUS DATA TABEL (CHECKBOX) ===== --}}

Hapus Data Tabel

Centang tabel yang dipilih lalu hapus seluruh isinya (tabel users dikecualikan)

@csrf
@forelse ($tables as $t) @empty @endforelse
Tabel Jumlah Baris
{{ $t['name'] }} {{ $t['count'] }} baris
Tidak ada tabel yang dapat dihapus.