@extends('backEnd.layouts.master') @section('title', 'Server & Cron (Super Admin)') @push('styles') @endpush @section('content')

Server & Cron Setup

Super Admin only — cPanel deploy, cron job, and system connection tests.

Super Admin
@foreach(['cron' => 'Cron Job', 'deploy' => 'cPanel Deploy', 'health' => 'Connection Tests'] as $key => $label) {{ $label }} @endforeach
@if($tab === 'cron')
cPanel Cron Job

CRM reminder, CarryBee sync, activity log purge — automatic চালাতে প্রতি মিনিটে cron লাগবে।

FieldValue
Minute*
Hour*
Day*
Month*
Weekday*
{{ $cronCommand }}
Registered Scheduled Tasks
@foreach($scheduled as $task) @endforeach
ScheduleCommandPurpose
{{ $task['expression'] }} {{ $task['command'] }} {{ $task['purpose'] }}
Project Path (for cron command)
@csrf
Example: /home/{{ $cpanelUser ?: 'USERNAME' }}/ecommerce
Cron ছাড়া CRM 30-day reminder, CarryBee status sync, activity log purge automatic চলবে না.
@endif @if($tab === 'deploy')
cPanel Deploy Checklist
  1. Backup: Database (phpMyAdmin), .env, storage/app/public/
  2. Local build: powershell -File scripts\build-cpanel-release.ps1
  3. Upload: release/cpanel-upload.zip → cPanel File Manager → Extract (overwrite)
  4. Protect: .env overwrite করবেন না; images backup restore করুন
  5. Upgrade (browser): .envAPP_UPGRADE=true → visit /upgrade
  6. Upgrade (Terminal): bash post-deploy-cpanel.sh (permissions + migrate + cache)
  7. After upgrade: APP_UPGRADE=false in .env
  8. Cron: Cron tab থেকে schedule:run every minute (see Cron Job tab)
  9. Verify: Homepage, admin login, sitemap, product images
Web Updater (Terminal ছাড়া)

CodeCanyon-style one-click upgrade — migrate + cache browser থেকে।

  1. .envAPP_UPGRADE=true
  2. Browser: {{ rtrim(config('app.url'), '/') }}/upgrade
  3. Click Run Upgrade Now
  4. Done → APP_UPGRADE=false

APP_UPGRADE_KEY optional — না দিলেও চলবে। ZIP-এ user uploads (storage/app/public) যায় না।

Post-deploy commands (Terminal)
cd {{ $projectPath }} bash fix-permissions.sh php artisan optimize:clear php artisan storage:link --force php artisan migrate --force php artisan config:cache php artisan route:cache php artisan view:cache php artisan optimize bash fix-permissions.sh
Manual configure after deploy
  • Integrations → Courier APIs
  • Integrations → Payment gateways
  • Integrations → SMTP / Email
  • Customer Support → Channels
  • Ad Management → Pixel / GA4
Full guide: project root CPANEL-UPDATE-GUIDE.md
@endif @if($tab === 'health')
Connection & System Tests
@foreach(\App\Services\SystemDiagnosticsService::checks() as $key => $meta) @php $result = $diagnostics[$key] ?? ['ok' => false, 'message' => 'Not run']; @endphp
{{ $meta['label'] }}
{{ $result['message'] ?? '' }}
@if(!empty($result['details']))
{{ $result['details'] }}
@endif
@endforeach
@endif
@endsection @push('scripts') @endpush