@extends('admin.layouts.admin') @section('title', 'Settings - SIVILIMA Admin') @section('breadcrumb_title', 'Site Settings') @section('breadcrumb') @endsection @section('content') @if(session('success')) @endif
@csrf @foreach($settings as $group => $items) @if($group === 'seo') @continue @endif @php $items = $items->filter(fn($s) => $s->type !== 'json'); @endphp @if($items->isNotEmpty())
{{ $group }} Settings
@foreach($items as $setting)
@if($setting->type === 'textarea') @else key}", $setting->value) }}"> @endif
@endforeach
@endif @endforeach {{-- Home Stats Editor --}} @php $jsonItems = \App\Models\SiteSetting::where('type', 'json')->get()->keyBy('key'); $stats = json_decode($jsonItems->get('home_stats')?->value ?? '[]', true); $features = json_decode($jsonItems->get('home_features')?->value ?? '[]', true); @endphp
Home Page - Stats
@foreach($stats as $i => $stat) @endforeach
NumberLabel
Home Page - Features
@foreach($features as $i => $feat) @endforeach
TitleDescription
{{-- About Page - Core Values --}} @php $aboutValues = json_decode($jsonItems->get('about_values')?->value ?? '[]', true); @endphp
About Page - Core Values
@foreach($aboutValues as $i => $val) @endforeach
TitleDescription
{{-- About Page - Timeline Milestones --}} @php $milestones = json_decode($jsonItems->get('about_milestones')?->value ?? '[]', true); @endphp
About Page - Timeline Milestones
@foreach($milestones as $i => $m) @endforeach
YearTitleDescription
@endsection @push('scripts') @endpush