@extends('layouts.dashboard') @section('title', __('System & Updates')) @section('page_title', __('System & Updates')) @section('content') @include('partials.how-it-works', ['key' => 'admin.system']) @php($fmt = fn ($b) => $b >= 1073741824 ? round($b / 1073741824, 1).' GB' : round($b / 1048576, 1).' MB')
{{ __('Run health check') }}
@include('partials.dashboard.stat-card', ['label' => __('Version'), 'value' => 'v'.$info['version'], 'icon' => 'bi-box-seam', 'color' => 'primary', 'hint' => __('Released :d', ['d' => $info['release_date']])])
@include('partials.dashboard.stat-card', ['label' => __('Pending migrations'), 'value' => $info['pending_migrations'], 'icon' => 'bi-database-gear', 'color' => $info['pending_migrations'] ? 'warning' : 'success'])
@include('partials.dashboard.stat-card', ['label' => __('Queue'), 'value' => $info['jobs_pending'], 'icon' => 'bi-stack', 'color' => $info['jobs_failed'] ? 'danger' : 'info', 'hint' => $info['jobs_failed'].' '.__('failed')])
@include('partials.dashboard.stat-card', ['label' => __('Scheduler'), 'value' => $info['scheduler_last'] ? __('Running') : __('Not running'), 'icon' => 'bi-clock-history', 'color' => $info['scheduler_last'] ? 'success' : 'danger', 'hint' => $info['scheduler_last'] ? __('last tick :t', ['t' => \Carbon\Carbon::parse($info['scheduler_last'])->diffForHumans()]) : __('add the cron entry')])
{{ __('Environment') }}
@foreach([ __('PHP') => $info['php'], __('Laravel') => $info['laravel'], __('Environment') => $info['env'].($info['debug'] ? ' · DEBUG ON' : ''), __('URL') => $info['url'], __('Timezone') => $info['timezone'], __('Database') => $info['db'].' · '.$info['db_version'], __('Cache / Queue / Session') => $info['cache'].' / '.$info['queue'].' / '.$info['session'], __('Mail driver') => $info['mail'], __('Storage link') => $info['storage_link'] ? '✓' : '✗ '.__('missing'), __('Config / route cache') => ($info['config_cached'] ? '✓' : '—').' / '.($info['routes_cached'] ? '✓' : '—'), __('Uploads') => $fmt($info['storage_used']), __('Disk free') => $fmt($info['disk_free']).' / '.$fmt($info['disk_total']), __('PHP limits') => 'memory '.$info['memory_limit'].' · upload '.$info['upload_max'].' · post '.$info['post_max'], __('Extensions') => implode(', ', array_keys($info['extensions'])) ?: '—', __('Installed') => $info['installed_at'] ? \Carbon\Carbon::parse($info['installed_at'])->format('M d, Y') : '—', ] as $k => $v) @endforeach
{{ $k }}{{ $v }}
@if($info['debug'] && $info['env'] === 'production')
{{ __('APP_DEBUG is on in production. Set APP_DEBUG=false in .env.') }}
@endif
{{ __('Updates') }}
@csrf
@if($update)
{{ $update['available'] ? __('Version :v available', ['v' => $update['latest']]) : __('You are up to date (v:v)', ['v' => $update['current']]) }}
{{ __('Checked') }} {{ \Carbon\Carbon::parse($update['checked_at'])->diffForHumans() }}
@if(!empty($update['url'])){{ __('Download') }}@endif
@if(!empty($update['notes']))

{{ $update['notes'] }}

@endif @else

{{ __('Click “Check now” to look for a newer release.') }}

@endif

{{ __('Upload the official release ZIP for this version. It may contain the project files directly or one WebSourceCode/ folder. Your .env, storage/ uploads and vendor/ are never touched.') }}

@csrf
@error('update_zip')
{{ $message }}
@enderror

{{ __('If the release adds new PHP dependencies, run') }} composer install --no-dev -o {{ __('over SSH first, or use the manual method instead.') }}

{{ __('How to update:') }} {{ __('take a backup, upload the new release files over the old ones (keep .env and storage/), then click “Apply update” below — it migrates, refreshes reference data and clears caches in one go and is safe to re-run. Full steps in') }} docs/UPDATING.md.

@if(auth()->user()->hasAnyRole(['owner', 'super-admin']))

{{ __('Super-admin shortcut: after copying the files in, hit this URL directly — no need to open this page or use SSH:') }}
{{ route('admin.system.quick-sync') }} {{ __('It migrates and re-syncs the super-admin/owner permission set, without a maintenance window.') }}

@endif
{{ __('Maintenance actions') }}
@foreach([ ['upgrade', 'bi-box-arrow-in-up', __('Apply update'), __('After uploading a new release: backup, migrate, reseed, clear caches')], ['migrate', 'bi-database-gear', __('Run migrations'), __('Apply pending schema changes')], ['clear-cache', 'bi-eraser', __('Clear caches'), __('Config, routes, views, app cache')], ['optimize', 'bi-lightning-charge', __('Optimize'), __('Cache config/routes/views for production')], ['storage-link', 'bi-link-45deg', __('Storage link'), __('Recreate public/storage symlink')], ['backup', 'bi-hdd-stack', __('Backup database'), __('Snapshot before updating')], [$info['maintenance'] ? 'up' : 'down', $info['maintenance'] ? 'bi-play-circle' : 'bi-cone-striped', $info['maintenance'] ? __('Disable maintenance mode') : __('Enable maintenance mode'), $info['maintenance'] ? __('Site is currently offline') : __('Show a maintenance page to visitors')], ['queue-retry', 'bi-arrow-repeat', __('Retry failed jobs'), $info['jobs_failed'].' '.__('failed jobs')], ['queue-flush', 'bi-trash3', __('Delete failed jobs'), __('Clear the failed_jobs table')], ] as [$act, $icon, $label, $desc])
@csrf
@endforeach
{{ __('Demo content') }} {{ $demoCounts['courses'] }} {{ __('courses') }} · {{ $demoCounts['users'] }} {{ __('users') }} · {{ $demoCounts['testimonials'] }} {{ __('testimonials') }}
@csrf
@csrf
{{-- Niche presets: the demo looks like the buyer's own business. --}}
@csrf
{{ __('Sets the site name and tagline to match, and fills the catalogue, blog and testimonials.') }}
@csrf
{{ __('Modules enabled:') }} {{ collect($modules)->where('enabled', true)->pluck('name')->join(', ') }}
@push('scripts') @endpush @endsection