@php $channel = $channel ?? null; $paramsText = collect((array) ($channel?->configValue('params', []) ?: [])) ->map(fn ($value, $key) => $key.'='.$value) ->implode("\n"); $headersText = collect((array) ($channel?->configValue('headers', []) ?: [])) ->map(fn ($value, $key) => $key.'='.$value) ->implode("\n"); $driverFields = config('store.notification_driver_fields', []); $currentDriver = old('driver', $channel?->driver ?? 'sms_http'); $kurdisoftEndpoint = config('store.kurdisoft.endpoint'); $fieldHelp = [ 'sms_http' => __('admin.sms_http_fields_help'), 'kurdisoft' => __('admin.kurdisoft_fields_help'), 'twilio' => __('admin.twilio_fields_help'), 'whatsapp' => __('admin.whatsapp_fields_help'), 'email' => __('admin.email_fields_help'), ]; $mailConfig = (array) config('mail.mailers.smtp', []); $mailFrom = (array) config('mail.from', []); $defaultTransport = (string) config('mail.default', 'smtp'); $defaultTransport = in_array($defaultTransport, ['smtp', 'sendmail', 'log'], true) ? $defaultTransport : 'smtp'; $emailTransport = old('transport', $channel?->configValue('transport') ?: $defaultTransport); $emailPort = old('port', $channel?->configValue('port') ?: ($mailConfig['port'] ?? 587)); $defaultEncryption = (($mailConfig['scheme'] ?? '') === 'smtps' || (int) $emailPort === 465) ? 'ssl' : (in_array((int) $emailPort, [25, 2525], true) ? 'none' : 'tls'); $emailEncryption = old('encryption', $channel?->configValue('encryption') ?: $defaultEncryption); $emailHost = old('host', $channel?->configValue('host') ?: ($mailConfig['host'] ?? '')); $emailUsername = old('username', $channel?->configValue('username') ?: ($mailConfig['username'] ?? '')); $emailFromAddress = old('from_address', $channel?->configValue('from_address') ?: (setting('store.email') ?: ($mailFrom['address'] ?? ''))); $emailFromName = old('from_name', $channel?->configValue('from_name') ?: (setting_text('store.name', '') ?: ($mailFrom['name'] ?? ''))); $emailReplyTo = old('reply_to', $channel?->configValue('reply_to')); $emailTimeout = old('timeout', $channel?->configValue('timeout') ?: ($mailConfig['timeout'] ?? 20)); $emailSendmailPath = old('sendmail_path', $channel?->configValue('sendmail_path') ?: config('mail.mailers.sendmail.path', '/usr/sbin/sendmail -bs -i')); $emailSubject = old('subject', $channel?->configValue('subject') ?: setting_text('store.name', 'Mandano 888')); $hasSavedPassword = filled($channel?->configValue('password')); $admins = collect($admins ?? []); $selectedAdminIds = collect(old('admin_ids', $channel?->configValue('admin_ids', []))) ->map(fn ($id) => (string) $id) ->all(); $requiresPhone = in_array($currentDriver, ['sms_http', 'kurdisoft', 'twilio', 'whatsapp'], true); $smtpTestUrl = route('admin.notifications.channels.smtp-test', $channel ? ['channel' => $channel] : []); @endphp
{{ __('admin.channel_credentials_title') }} {{ __('admin.channel_credentials_help') }}

@foreach ($driverFields as $driver => $fields) @endforeach

{{ __('admin.email_delivery') }} {{ __('admin.email_delivery_help') }}

{{ __('admin.smtp_test_help') }}

{{ __('admin.admin_alert_recipients') }} @if ($admins->isEmpty())

{{ __('admin.no_admins') }}

@else
@foreach ($admins as $admin) @php($missingPhone = $requiresPhone && blank($admin->phone)) @endforeach
@endif {{ __('admin.admin_alert_recipients_help') }}