@extends('layouts.admin') @section('title', 'Notification Settings') @section('header', 'Notification Settings') @section('content')
Firebase Push Health

These values are what the admin panel will actually use for order pushes and custom broadcasts across customer, store, and driver apps.

{{ !empty($firebaseDiagnostics['configured']) ? 'Connected' : 'Not Ready' }}
Firebase Enabled
{{ !empty($firebaseDiagnostics['enabled']) ? 'Yes' : 'No' }}
Project ID
{{ $firebaseDiagnostics['project_id'] ?: 'Not set' }}
Service Account
{{ !empty($firebaseDiagnostics['service_account_exists']) ? 'Uploaded' : 'Missing' }}
Failure Reason
{{ !empty($firebaseDiagnostics['configured']) ? 'None' : ($firebaseDiagnostics['failure_reason'] ?: 'None') }}
Admin Push Broadcasts

Create live push notifications for all users or selected roles with delivery history.

Open Push Notifications
Send Test Push

Send a live test notification to one real app user by app role and mobile number.

Customer / Store / Driver
@csrf
Use the same mobile number that is logged in on the target app. The user must have opened the app at least once so an FCM token is saved.
Notification Provider Settings
@csrf
@php $twilioAccountSid = $settings['twilio_account_sid'] ?? ''; $maskedTwilioAccountSid = !empty($twilioAccountSid) ? substr($twilioAccountSid, 0, 3) . str_repeat('*', 8) . substr($twilioAccountSid, -3) : ''; @endphp
@php $twilioAuthToken = $settings['twilio_auth_token'] ?? ''; $maskedTwilioAuthToken = !empty($twilioAuthToken) ? substr($twilioAuthToken, 0, 3) . str_repeat('*', 8) . substr($twilioAuthToken, -3) : ''; @endphp

Pusher Realtime Settings
Required for realtime order updates
Set Broadcast Connection to Pusher after adding valid Pusher credentials. Saved credentials are shown below for direct editing.
@php $pusherSecret = $settings['pusher_app_secret'] ?? config('broadcasting.connections.pusher.secret', ''); $maskedPusherSecret = !empty($pusherSecret) ? substr($pusherSecret, 0, 3) . str_repeat('*', 8) . substr($pusherSecret, -3) : ''; @endphp
Saved secret is shown here. Edit it directly when needed.

Firebase Settings
Required for live push delivery
Upload the Firebase Admin SDK service-account JSON here. That is the credential used for order notifications and admin custom push notifications in all apps.
The server key field is kept only for legacy compatibility and is not the primary credential used by the current push service.
@php $firebaseApiKey = $settings['firebase_api_key'] ?? ''; $maskedFirebaseApiKey = !empty($firebaseApiKey) ? substr($firebaseApiKey, 0, 3) . str_repeat('*', 8) . substr($firebaseApiKey, -3) : ''; @endphp
@php $firebaseServerKey = $settings['firebase_server_key'] ?? ''; $maskedFirebaseServerKey = !empty($firebaseServerKey) ? substr($firebaseServerKey, 0, 3) . str_repeat('*', 8) . substr($firebaseServerKey, -3) : ''; @endphp Optional legacy field. Live push delivery uses the Admin SDK JSON uploaded below.
@if(!empty($firebaseDiagnostics['service_account_exists']))
Service account is uploaded
Current file: {{ basename($settings['firebase_service_account_path'] ?? '') }}
Choose a new Firebase Admin SDK JSON only when you want to replace the saved credential. @else @if(!empty($settings['firebase_service_account_path'])) Saved path exists in settings, but the file is not readable. Upload the JSON again. @endif @endif
Saved Firebase credential values are visible above for direct review and editing.
@endsection