@if(count($columns)) @foreach($columns as $column) @endforeach @php $mains = $entry->detials()->whereNull('main_item_id')->get(); @endphp @foreach($mains as $main) @php $category = App\Models\MainCategory::where('id', $main->main_category_id)->first(); $items = $entry->detials()->where('main_category_id', $main->main_category_id)->whereNotNull('main_item_id')->get(); $mainItem = $entry->detials()->where('main_category_id', $main->main_category_id)->whereNull('main_item_id')->first(); @endphp @foreach($items as $item) @if(!empty($item->size)) @endif @endforeach @endforeach
index === 0) class="border-top-0 text-end" @else class=" text-end" @endif> {!! $column['label'] !!}@if(!empty($column['label'])):@endif index === 0) class="border-top-0" @endif> @php // create a list of paths to column blade views // including the configured view_namespaces $columnPaths = array_map(function($item) use ($column) { return $item.'.'.$column['type']; }, \Backpack\CRUD\ViewNamespaces::getFor('columns')); // but always fall back to the stock 'text' column // if a view doesn't exist if (!in_array('crud::columns.text', $columnPaths)) { $columnPaths[] = 'crud::columns.text'; } @endphp @includeFirst($columnPaths)
{{$category->title}} {{trans('common.appendix')}} @if(!empty($category->appendix) && count($category->appendix) > 0) @foreach($category->appendix as $key => $appendix) appendix)) @foreach(json_decode($mainItem->appendix, true) as $appendixItem) @if(strpos($appendixItem, $appendix['appendix'] . "-")) href="{{ asset("storage/$appendixItem") }}" @endif @endforeach @endif > {!! $appendix['appendix'] !!} @if(count($category->appendix) != $key + 1) | @endif @endforeach @endif
{{$item?->mainItem?->title}} {!! str_replace('{count}', " $item->total ", $item?->mainItem?->placeholder) !!} @if(!empty($item?->mainItem?->appendix) && empty($item->size))
{{trans('common.appendix')}} @foreach($item?->mainItem?->appendix as $key => $appendix) @if(!empty($item?->mainItem?->appendix)) @foreach(json_decode($item->appendix, true) as $appendixItem) @if(strpos($appendixItem, $appendix['appendix'] . "-")) {!! $appendix['appendix'] !!} @if(count($item?->mainItem?->appendix) != $key + 1) | @endif @endif @endforeach @endif @endforeach
@endif
{!! str_replace('{size}', " $item->size ", $item?->mainItem?->additional) !!}
@if(!empty($item?->mainItem?->appendix))
{{trans('common.appendix')}} @foreach($item?->mainItem?->appendix as $key => $appendix) @if(!empty($item?->mainItem?->appendix)) @foreach(json_decode($item->appendix, true) as $appendixItem) @if(strpos($appendixItem, $appendix['appendix'] . "-")) {!! $appendix['appendix'] !!} @if(count($item?->mainItem?->appendix) != $key + 1) | @endif @endif @endforeach @endif @endforeach
@endif
@endif