@extends('layouts.meridian') @section('title', 'CMS Settings') @php $fieldValue = function (string $key, string $fallback = '') use ($settings): string { return (string) old("settings.{$key}", $settings[$key] ?? $fallback); }; $autoLinkRows = []; $oldKeywords = old('seo_auto_link_keywords'); $oldUrls = old('seo_auto_link_urls'); if (is_array($oldKeywords)) { foreach ($oldKeywords as $index => $keyword) { $autoLinkRows[] = [ 'keyword' => (string) $keyword, 'url' => (string) ($oldUrls[$index] ?? ''), ]; } } else { $autoLinkRows = $seoAutoLinks ?? []; } if (count($autoLinkRows) === 0) { $autoLinkRows[] = ['keyword' => '', 'url' => '']; } @endphp @push('head') @endpush @section('content')
@csrf
@foreach($groups as $id => $group)
{{ $group['label'] }}

{{ $group['label'] }}

{{ $group['description'] }}

{{ count($group['fields']) }} field
@foreach($group['fields'] as $field) @php $key = $field['key']; $type = $field['type'] ?? 'text'; $fallback = (string) ($field['fallback'] ?? ($type === 'color' ? '#6f4f43' : '')); $value = $fieldValue($key, $fallback); if ($type === 'image') { $value = \App\Support\AssetUrl::relative($value, $fallback) ?? $fallback; } $isWide = in_array($type, ['textarea', 'credential', 'auto_links'], true); @endphp
@if($type === 'auto_links') @elseif($type === 'image')
{{ $field['label'] }} Belum ada gambar
@elseif($type === 'textarea') @if($secretConfigured[$key] ?? false)

Rahasia sudah tersimpan dan tidak ditampilkan kembali.

@endif @elseif($type === 'credential') @php($hasCredential = (bool) ($secretConfigured[$key] ?? false))

{{ $hasCredential ? 'Credential aktif tersimpan dan siap digunakan.' : 'Belum ada credential tersimpan.' }}

@elseif($type === 'select') @elseif($type === 'color')
{{ $value ?: '#6f4f43' }}
@else @endif
@endforeach
@endforeach
Advanced

Raw Keys

Area lanjutan untuk key custom yang belum masuk kategori utama.

Gunakan bagian ini hanya untuk key custom atau integrasi yang belum tersedia di tab utama. Pengaturan umum, media, SEO, kontak, dan Google sebaiknya diubah dari tab masing-masing.

@forelse($rawSettings as $setting) @empty @endforelse
Key Value Delete
{{ $setting->key }}
Tidak ada raw key tambahan.
Batal
@endsection @push('scripts') @endpush