@extends('layouts.admin')
@section('title', 'Settings')
@section('page-title', 'System Settings')
@section('content')
{{-- Tab bar --}}
@php
$navTabs = [
['key'=>'info', 'label'=>'App Info', 'icon'=>'M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'],
['key'=>'integrations','label'=>'Integrations', 'icon'=>'M11 4a2 2 0 114 0v1a1 1 0 001 1h3a1 1 0 011 1v3a1 1 0 01-1 1h-1a2 2 0 100 4h1a1 1 0 011 1v3a1 1 0 01-1 1h-3a1 1 0 01-1-1v-1a2 2 0 10-4 0v1a1 1 0 01-1 1H7a1 1 0 01-1-1v-3a1 1 0 00-1-1H4a2 2 0 110-4h1a1 1 0 001-1V7a1 1 0 011-1h3a1 1 0 001-1V4z'],
['key'=>'payment', 'label'=>'Payments', 'icon'=>'M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z'],
['key'=>'email', 'label'=>'Email', 'icon'=>'M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z'],
['key'=>'push', 'label'=>'Push Notifications', 'icon'=>'M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9'],
['key'=>'security', 'label'=>'Security', 'icon'=>'M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z'],
['key'=>'maintenance', 'label'=>'Maintenance', 'icon'=>'M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z'],
['key'=>'app-config', 'label'=>'App Config', 'icon'=>'M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z'],
['key'=>'seo', 'label'=>'SEO', 'icon'=>'M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'],
['key'=>'license', 'label'=>'License', 'icon'=>'M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z'],
];
@endphp
@foreach($navTabs as $t)
{{ $t['label'] }}
@endforeach
{{-- ── App Info ──────────────────────────────────────────────────────────────── --}}
Application Context
Current environment, integrations, and configured plan limits.
App Name
{{ $appSettings['app_name'] }}
App URL
{{ $appSettings['app_url'] }}
Firebase Project
@if($appSettings['firebase_project'])
{{ $appSettings['firebase_project'] }}
@else
Not configured
@endif
Active Integrations
Stripe
PayPal
FCM Push
Plan Limits
@forelse($appSettings['plans'] as $plan => $limits)
{{ ucfirst($plan) }}
Stores: {{ $limits['stores'] ?? '∞' }}
Products: {{ $limits['products'] ?? '∞' }}
Devices: {{ $limits['devices'] ?? '∞' }}
Storage: {{ $limits['storage_gb'] ?? '∞' }} GB
@empty
No plan limits configured.
@endforelse
{{-- /tab: info --}}
{{-- ── Integrations ──────────────────────────────────────────────────────────── --}}
Integrations
Manage Firebase, Google Drive, and Google OAuth credentials.
{{-- /tab: integrations --}}
{{-- ── Email ──────────────────────────────────────────────────────────────────── --}}
Email
Configure outgoing email delivery for notifications and receipts.
{{-- Test Email (separate form) --}}
Send Test Email
Verify your email configuration by sending a test message. Save settings above first.
{{-- /tab: email --}}
{{-- ── Payments ──────────────────────────────────────────────────────────────── --}}
Payments
Enable and configure Stripe, PayPal, and crypto payment methods.
{{-- /tab: payment --}}
{{-- ── Push Notifications ────────────────────────────────────────────────────── --}}
Push Notifications
Send a test Firebase Cloud Messaging notification to any active device.
@if($appSettings['push_ready'])
@else
@endif
@if($appSettings['push_ready'])
Firebase HTTP v1 is ready — push notifications can be sent.
@else
Upload the service-account JSON in the Integrations tab to enable push notifications.
@endif
{{ $devices->count() }} device{{ $devices->count() !== 1 ? 's' : '' }} with active FCM tokens
@if($devices->isNotEmpty())
Registered Devices
User
Device ID
Platform
FCM Token (preview)
@foreach($devices as $device)
{{ $device->user->name ?? '—' }}
{{ Str::limit($device->device_id, 20) }}
{{ $device->platform }}
{{ Str::limit($device->fcm_token, 32) }}…
@endforeach
@endif
{{-- /tab: push --}}
{{-- ── Security ──────────────────────────────────────────────────────────────── --}}
Change Admin Password
Update the password for your admin account.
{{-- /tab: security --}}
{{-- ── Maintenance ───────────────────────────────────────────────────────────── --}}
Clear Application Cache
Clears config, route, and view cache. Run this after updating .env values.
Environment
PHP Version
{{ PHP_MAJOR_VERSION }}.{{ PHP_MINOR_VERSION }}.{{ PHP_RELEASE_VERSION }}
Laravel
{{ app()->version() }}
Environment
{{ ucfirst(app()->environment()) }}
Debug Mode
{{ config('app.debug') ? 'ON' : 'OFF' }}
{{-- /tab: maintenance --}}
{{-- ── App Config ──────────────────────────────────────────────────────────────────── --}}
Mobile App Configuration
Server URL exposed to the Flutter app via the public /api/app-config endpoint. Change this when you move the server to a new domain or port.
{{-- /tab: app-config --}}
{{-- ── License ──────────────────────────────────────────────────────────────── --}}
{{-- Status card --}}
@php
$licVerified = $appSettings['license']['verified'];
$licType = $appSettings['license']['type'];
@endphp
License Status
@if($licVerified)
@else
@endif
{{ $licVerified ? '✓ Verified' : 'Not Activated' }}
@if($licType)
License Type: {{ $licType }}
@endif
{{-- Update form --}}
License Verification
Enter your Quickro POS purchase code and buyer email to verify or re-activate the license.
@if(session('success') && request()->get('tab') === 'license')
{{ session('success') }}
@endif
@if($errors->any())
@foreach($errors->all() as $err)
{{ $err }}
@endforeach
@endif
@if($appSettings['license']['verified'])
Remove License
Deactivate this installation so the license can be used on a different domain.
@endif
{{-- /tab: license --}}
{{-- ── SEO ──────────────────────────────────────────────────────────────────── --}}
{{-- /tab: seo --}}
{{-- /tab: license --}}
{{-- /x-data tab wrapper --}}
@endsection