This commit is contained in:
parent
951ac00df2
commit
bb3940c1b6
|
|
@ -153,7 +153,7 @@ class ContentRepository extends Repository
|
|||
'content_type' => $content->content_type,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
return $formattedContent;
|
||||
}
|
||||
}
|
||||
|
|
@ -136,7 +136,17 @@
|
|||
3 => [],
|
||||
2 => [],
|
||||
];
|
||||
$advertisement = json_decode($metaData->get('advertisement')->all()[0]->advertisement, true);
|
||||
|
||||
$index = 0;
|
||||
$currentLocale = request()->get('locale') ?: core()->getCurrentLocale();
|
||||
|
||||
foreach ($metaData->get('locale')->all() as $key => $value) {
|
||||
if ($value->locale == $currentLocale) {
|
||||
$index = $key;
|
||||
}
|
||||
}
|
||||
|
||||
$advertisement = json_decode($metaData->get('advertisement')->all()[$index]->advertisement, true);
|
||||
@endphp
|
||||
|
||||
@if(! isset($advertisement[4]))
|
||||
|
|
|
|||
Loading…
Reference in New Issue