@php use App\Enums\InformationMasterialType; use App\Enums\Boolean; @endphp @if (fieldPropertyValue('status', $item))
{!! setTextDefault(textLocale('heading', $item, $lang)) !!} {!! setTextDefault(textLocale('heading_sp', $item, $lang)) !!}
{!! setTextDefault(textLocale('body', $item, $lang)) !!} {!! setTextDefault(textLocale('body_sp', $item, $lang)) !!}
@endif @foreach ($restaurantInformations as $val) @php $listImagePc = []; $listImageSp = []; for ($i=1; $i <= 8; $i++) { if (! empty($val['image'.$i])) { $listImagePc[] = $val['image'.$i]; } if (! empty($val['image'.$i.'_sp'])) { $listImageSp[] = $val['image'.$i.'_sp']; } } if (count($listImageSp) == 0) { for ($i=1; $i <= 8; $i++) { if (! empty($val['image'.$i])) { $listImageSp[] = $val['image'.$i]; } } } @endphp
@if (count($listImagePc) == 0)
@else @foreach ($listImagePc as $image)
@endforeach @endif
@if (count($listImageSp) == 0)
@else @foreach ($listImageSp as $image)
@endforeach @endif
@php $nameRestaurantSp = nameRestaurantSp($val, $lang); $isLogoSp = $nameRestaurantSp['isLogo']; $nameSp = $nameRestaurantSp['name']; $logoSp = $nameRestaurantSp['logo']; @endphp
@if (fieldPropertyValue('is_logo', $val) == Boolean::TRUE)
@else
{!! setTextDefault(textLocale('name', $val, $lang)) !!}
@endif @if ($isLogoSp == Boolean::TRUE)
@else
{!! $nameSp !!}
@endif
{!! setTextDefault(textLocale('descriptive', $val, $lang)) !!} {!! setTextDefault(textLocale('descriptive_sp', $val, $lang)) !!}
{!! config('translate.' . $lang . '.dish_page.btn_view_detail') !!}
@if ($val['restaurant_information_details'])
@php $restaurantInformationDetails = getInformationMaterial($val['restaurant_information_details'], $lang); @endphp @foreach ($restaurantInformationDetails 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) {!! fieldPropertyValue('pdf_descriptive', $detail) !!} @break @endswitch
{!! fieldPropertyValue('heading_sp', $detail) !!}
@switch(fieldPropertyValue('type_sp', $detail)) @case(InformationMasterialType::TEXT)
{!! fieldPropertyValue('descriptive_sp', $detail) !!}
@break @case(InformationMasterialType::BUTTON) {!! fieldPropertyValue('button_name_sp', $detail) !!} @break @case(InformationMasterialType::PDF) {!! fieldPropertyValue('pdf_descriptive_sp', $detail) !!} @break @endswitch
@endforeach
@endif {!! config('translate.' . $lang . '.dish_page.btn_view_detail') !!}
@endforeach