@extends('layout.admin') @section('styles') @endsection @section('content')

General Setting / Edit

{{csrf_field()}}
@if ($errors->has('name')) {{ $errors->first('name') }} @endif
@php $txt = json_decode($setting['contents'], true); @endphp @switch($setting->id) @case(3)
@if (!empty($txt['main_logo'])) logo @endif
@if (!empty($txt['favicon'])) Favicon @endif
@if (!empty($txt['footer_logo'])) Footer Logo @endif
@if (!empty($txt['dark_logo'])) Dark Logo @endif
@break @case(5)
@break @case(6)
@break @case(11)
@break @case(12)
@break @case(13)

Reviews Portal Logos and Links

@php $logoIndex = 1; @endphp @while(!empty($txt["upload_logo_{$logoIndex}"]))
Logo Preview
@php $logoIndex++; @endphp @endwhile
Logo Preview

Popular Cities

@php $selectedCities = []; if (isset($txt['choose_popular_cities'])) { $selectedCities = is_array($txt['choose_popular_cities']) ? $txt['choose_popular_cities'] : explode(',', $txt['choose_popular_cities']); } @endphp

Holiday Country

Business Slogans with Icons

@php $i = 1; @endphp @while(!empty($txt["business_slogan_icon_$i"]) || !empty($txt["business_slogan_input_$i"]))
@php $i++; @endphp @endwhile

Continents Slider on Home Page

@break @case(14) @php // Parse link_1_content - handle both old HTML format and new array format $link1Data = []; if (!empty($txt['link_1_content'])) { if (is_string($txt['link_1_content']) && (strpos($txt['link_1_content'], '<') !== false || strpos($txt['link_1_content'], '[') === 0)) { // Try to decode if it's JSON $decoded = json_decode($txt['link_1_content'], true); if (json_last_error() === JSON_ERROR_NONE && is_array($decoded)) { $link1Data = $decoded; } else { // Parse HTML links $dom = new \DOMDocument(); @$dom->loadHTML(mb_convert_encoding($txt['link_1_content'], 'HTML-ENTITIES', 'UTF-8')); $links = $dom->getElementsByTagName('a'); foreach ($links as $link) { $link1Data[] = [ 'link' => $link->getAttribute('href'), 'text' => trim($link->textContent) ]; } } } elseif (is_array($txt['link_1_content'])) { $link1Data = $txt['link_1_content']; } } // If empty, add one empty row if (empty($link1Data)) { $link1Data = [['link' => '', 'text' => '']]; } // Parse link_2_content - handle both old HTML format and new array format $link2Data = []; if (!empty($txt['link_2_content'])) { if (is_string($txt['link_2_content']) && (strpos($txt['link_2_content'], '<') !== false || strpos($txt['link_2_content'], '[') === 0)) { // Try to decode if it's JSON $decoded = json_decode($txt['link_2_content'], true); if (json_last_error() === JSON_ERROR_NONE && is_array($decoded)) { $link2Data = $decoded; } else { // Parse HTML links $dom = new \DOMDocument(); @$dom->loadHTML(mb_convert_encoding($txt['link_2_content'], 'HTML-ENTITIES', 'UTF-8')); $links = $dom->getElementsByTagName('a'); foreach ($links as $link) { $link2Data[] = [ 'link' => $link->getAttribute('href'), 'text' => trim($link->textContent) ]; } } } elseif (is_array($txt['link_2_content'])) { $link2Data = $txt['link_2_content']; } } // If empty, add one empty row if (empty($link2Data)) { $link2Data = [['link' => '', 'text' => '']]; } @endphp

Footer Link 1

Footer Link 2

Footer Contacts

Footer Below Copyright Text

Footer Cookies Notice

@break @case(15)
@php $j = 1; @endphp {{-- Use a while loop that checks if *any* of the key fields exist for this index --}} @while( !empty($txt["social_media_icons_$j"]) || !empty($txt["social_media_icons_input_$j"]) || !empty($txt["social_media_icons_icon_$j"]) )
{{-- Icon Preview --}} {{-- Choose Icon Button --}} {{-- Remove Button --}}
{{-- HIDDEN: Icon Path --}}
@php $j++; @endphp @endwhile
@break @case(16)
@break @case(18)
@break @case(19)
@endsection @section('script') @endsection