@extends('layouts.super_admin') @section('title', 'Database Backups') @section('content')
Total Backups

{{ $stats['total_backups'] ?? 0 }}

Total Size

{{ formatFileSize($stats['total_size'] ?? 0) }}

Manual

{{ $stats['manual_backups'] ?? 0 }}

Scheduled

{{ $stats['scheduled_backups'] ?? 0 }}

Backup Management
@csrf
@csrf
Backup History
@if(session('success')) @endif @if(session('error')) @endif
@forelse($backups as $backup) @empty @endforelse
ID File Name Type Size Status Created Created By Actions
{{ $backup->id }} {{ $backup->file_name }}
{{ substr($backup->checksum, 0, 16) }}...
@php $typeLabel = match($backup->backup_type) { 'manual' => 'Manual', 'scheduled_daily' => 'Daily', 'scheduled_weekly' => 'Weekly', 'scheduled_monthly' => 'Monthly', default => ucfirst(str_replace('_', ' ', $backup->backup_type)) }; $typeColor = match($backup->backup_type) { 'manual' => 'primary', 'scheduled_daily' => 'success', 'scheduled_weekly' => 'info', 'scheduled_monthly' => 'warning', default => 'secondary' }; @endphp {{ $typeLabel }} {{ $backup->file_size_human }} @if($backup->status === 'completed') Completed @elseif($backup->status === 'failed') Failed @elseif($backup->status === 'pending') Pending @else {{ ucfirst($backup->status) }} @endif @if($backup->is_encrypted) @endif {{ $backup->created_at->format('d M Y, H:i') }}
{{ $backup->created_at->diffForHumans() }}
@if($backup->creator) {{ $backup->creator->name ?? 'System' }} @else System @endif
@if($backup->status === 'completed' && $backup->fileExists())
@csrf
@endif
@csrf @method('DELETE')
No backups found. Create your first backup to get started.
@endsection