@extends('admin::layouts.content') @section('page_title') {{ __('velocity::app.admin.meta-data.title') }} @stop @section('content')
@csrf
@php $images = [ 4 => [], 3 => [], 2 => [], ]; $advertisement = json_decode($metaData->get('advertisement')->all()[0]->advertisement, true); @endphp @if(! isset($advertisement[4])) @else @foreach ($advertisement[4] as $index => $image) @php $images[4][] = [ 'id' => 'image_' . $index, 'url' => asset('/storage/' . $image), ]; @endphp @endforeach @endif
@if(! isset($advertisement[3])) @else @foreach ($advertisement[3] as $index => $image) @php $images[3][] = [ 'id' => 'image_' . $index, 'url' => asset('/storage/' . $image), ]; @endphp @endforeach @endif
@if(! isset($advertisement[2])) @else @foreach ($advertisement[2] as $index => $image) @php $images[2][] = [ 'id' => 'image_' . $index, 'url' => asset('/storage/' . $image), ]; @endphp @endforeach @endif
@stop @push('scripts') @endpush