This commit is contained in:
Shubham Mehrotra 2020-07-24 17:17:34 +05:30
parent 951ac00df2
commit bb3940c1b6
2 changed files with 12 additions and 2 deletions

View File

@ -153,7 +153,7 @@ class ContentRepository extends Repository
'content_type' => $content->content_type,
]);
}
return $formattedContent;
}
}

View File

@ -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]))