@extends('template.layouts.template-base') @section('title', 'Products Details - Product Master') @section('content')
{{-- {{ dd($product->uom, $units) }} --}}
@php $uomIds = $product->uom ? explode(',', $product->uom) : []; @endphp @if (count($uomIds) > 0) @foreach ($uomIds as $unitId) @php $selectedUnit = $units->firstWhere('id', trim($unitId)); @endphp @if ($selectedUnit) {{ $selectedUnit->value }} @endif @endforeach @else - @endif
@if (isset($product->product_image) && $product->product_image) Product Image @else Images @endif

Current Product Image

Attachments
@if (isset($product->attachments) && count($product->attachments) > 0)
@foreach ($product->attachments as $attachment) @php $ext = strtolower( pathinfo($attachment->attachment, PATHINFO_EXTENSION), ); $isPdf = $ext === 'pdf'; @endphp @endforeach
@else

No attachments available

@endif
@endsection @section('scripts') @endsection