@php use App\Enums\InformationMasterialType; use App\Enums\MultiLangMode; @endphp
@foreach ($otherFacilitiesElements as $val) @php $listImagePc = []; $listImageSp = []; for ($i = 1; $i <= 4; $i++) { if (!empty($val['image' . $i])) { $listImagePc[] = $val['image' . $i]; } if (!empty($val['image' . $i . '_sp'])) { $listImageSp[] = $val['image' . $i . '_sp']; } } if (count($listImagePc) == 0) { $listImagePc[] = 'https://assets.micado-rayout.jp/img/common/no-image-found-360x250.png'; } if (count($listImageSp) == 0) { $listImageSp = $listImagePc; } @endphp
@foreach ($listImagePc as $image)
@endforeach
@if (count($listImagePc) > 1)
@endif
{!! setTextDefault(fieldPropertyValue('heading_en', $val)) !!}
@if ($lang != MultiLangMode::ENGLISH)
{!! setTextDefault(textLocale('heading', $val, $lang)) !!}
@endif
{!! setTextDefault(textLocale('descriptive', $val, $lang)) !!}
@php $informationMaterial = getInformationMaterial($val['other_facility_information_details'], $lang); @endphp
@foreach ($informationMaterial as $detail)
{!! fieldPropertyValue('heading', $detail) !!}
@switch(fieldPropertyValue('type', $detail)) @case(InformationMasterialType::TEXT)
{!! fieldPropertyValue('descriptive', $detail) !!}
@break @case(InformationMasterialType::BUTTON) {!! fieldPropertyValue('button_name', $detail) !!} @break @case(InformationMasterialType::PDF) @if (fieldPropertyValue('pdf_descriptive', $detail)) @endif @break @endswitch
@endforeach
@foreach ($listImageSp as $image)
@endforeach
{!! setTextDefault(fieldPropertyValue('heading_sp_en', $val)) !!}
@if ($lang != MultiLangMode::ENGLISH)
{!! setTextDefault(textLocale('heading_sp', $val, $lang)) !!}
@endif
{!! setTextDefault(textLocale('descriptive_sp', $val, $lang)) !!}
@php $informationMaterial = getInformationMaterial($val['other_facility_information_details'], $lang); @endphp
@foreach ($informationMaterial as $detail)
{!! fieldPropertyValue('heading_sp', $detail) !!}
@switch(fieldPropertyValue('type', $detail)) @case(InformationMasterialType::TEXT)
{!! fieldPropertyValue('descriptive_sp', $detail) !!}
@break @case(InformationMasterialType::BUTTON) {!! fieldPropertyValue('button_name_sp', $detail) !!} @break @case(InformationMasterialType::PDF) @if (fieldPropertyValue('pdf_descriptive_sp', $detail)) @endif @break @endswitch
@endforeach
@endforeach