@extends('layouts.admin')
@section('title', 'Platform Settings')
@push('styles')
@endpush
@section('content')
@if(session('success'))
@include('auth.partials.two-factor-panel', [
'twofaEnabled' => auth()->user()->hasTwoFactorEnabled(),
'pending2fa' => $pending2fa ?? null,
'confirmRoute' => route('admin.security.2fa.confirm'),
'disableRoute' => route('admin.security.2fa.disable'),
'recoveryRoute'=> route('admin.security.2fa.recovery'),
])
{{-- ============ DEPLOY TAB ============ --}}
@php
$deployKey = $deployKey ?? '';
$deployBase = $deployKey ? '/deploy/?key=' . $deployKey : '';
$deployActions = [
['path' => '', 'label' => 'Open Deploy Panel', 'desc' => 'Full dashboard with every action.', 'icon' => 'fa-rocket', 'variant' => 'primary'],
['path' => 'cache-clear', 'label' => 'Clear Cache', 'desc' => 'Flush config, route, view, and app caches.', 'icon' => 'fa-broom', 'variant' => 'secondary'],
['path' => 'cache-build', 'label' => 'Rebuild Cache', 'desc' => 'Re-cache config, routes, and views.', 'icon' => 'fa-bolt', 'variant' => 'secondary'],
['path' => 'optimize', 'label' => 'Optimize', 'desc' => 'One-shot clear + rebuild all caches.', 'icon' => 'fa-gauge-high', 'variant' => 'secondary'],
['path' => 'migrate', 'label' => 'Run Migrations', 'desc' => 'Apply pending database migrations.', 'icon' => 'fa-database', 'variant' => 'secondary'],
['path' => 'seed', 'label' => 'Run Seeders', 'desc' => 'Re-seed reference data (plans, roles).', 'icon' => 'fa-seedling', 'variant' => 'secondary'],
['path' => 'storage-link', 'label' => 'Storage Link', 'desc' => 'Create public/storage symlink.', 'icon' => 'fa-link', 'variant' => 'secondary'],
['path' => 'status', 'label' => 'Deploy Status', 'desc' => 'View current app, env, and git status.', 'icon' => 'fa-circle-info', 'variant' => 'secondary'],
];
@endphp
Master Deploy
@if(empty($deployKey))
DEPLOY_KEY not set.
Add DEPLOY_KEY=... to your .env file to enable the deploy panel.
@else
One-click shortcuts to the shared-hosting deploy runner. The key is pulled from .env — if you rotate it there, this page updates automatically.
@foreach($deployActions as $action)
@php
$deployHref = $action['path']
? '/deploy/' . $action['path'] . '?key=' . $deployKey
: '/deploy/?key=' . $deployKey;
@endphp
{{ $action['label'] }}
{{ $action['desc'] }}
@endforeach
@endif
@if(!empty($deployKey))
Security
Deploy links carry the secret key in the URL — don't share them. If a key leaks, rotate DEPLOY_KEY in .env, then hit Clear Cache.
Key ending in
…{{ substr($deployKey, -8) }}
@endif
@endsection
@push('scripts')
@endpush