@php
use App\Enums\LinkType;
$sightseeingSpots = [];
if (count($touristRoutes)) {
foreach ($touristRoutes as $touristRoute) {
if (fieldPropertyValue('sightseeing_spot_contents', $touristRoute)) {
$sightseeingSpots = array_merge($sightseeingSpots, fieldPropertyValue('sightseeing_spot_contents', $touristRoute));
}
}
}
@endphp
@foreach ($sightseeingCategories as $category)
@endforeach
@if (count($sightseeingSpots))
@foreach ($sightseeingSpots as $index => $val)
-
@if (fieldPropertyValue('category_ids', $val))
@foreach (fieldPropertyValue('category_ids', $val) as $categoryId)
@php
$category = current(
array_filter($sightseeingCategories, function ($sightseeingCategory) use ($categoryId) {
return fieldPropertyValue('id', $sightseeingCategory) == $categoryId;
}),
);
@endphp
@if ($category)
- {!! setTextDefault(textLocale('name', $category, $lang)) !!}
@endif
@endforeach
@endif
@if (fieldPropertyValue('category_ids_sp', $val))
@foreach (fieldPropertyValue('category_ids_sp', $val) as $categoryId)
@php
$category = current(
array_filter($sightseeingCategories, function ($sightseeingCategory) use ($categoryId) {
return fieldPropertyValue('id', $sightseeingCategory) == $categoryId;
}),
);
@endphp
@if ($category)
- {!! setTextDefault(textLocale('name', $category, $lang)) !!}
@endif
@endforeach
@endif
{!! setTextDefault(textLocale('name', $val, $lang)) !!}
{!! setTextDefault(textLocale('name_sp', $val, $lang)) !!}
{!! setTextDefault(textLocale('descriptive', $val, $lang)) !!}
{!! setTextDefault(textLocale('descriptive_sp', $val, $lang)) !!}
@if (fieldPropertyValue('link_type', $val) == LinkType::THERE_IS_A_LINK)
@else
@endif
@if (fieldPropertyValue('link_type_sp', $val) == LinkType::THERE_IS_A_LINK)
@else
@endif
@endforeach
@endif