@extends('layouts.app') @section('title', $productMaster->product_name . ' - Master Details - Quotation App') @section('styles') @endsection @section('content')
| # | Master Product | Model | Price | Specifications | Actions |
|---|---|---|---|---|---|
| {{ $loop->iteration }} | {{ $productMaster->product_name }} | {{ $product->product_model }} | ₹{{ number_format($product->default_price, 2) }} |
@php
$uniqueSpecs = $productMaster->products
->where('product_model', $product->product_model)
->where('product_master_id', $productMaster->id)
->filter(fn($p) => $p->spec_name)
->unique(fn($p) => $p->spec_name)
->values();
@endphp
@if($uniqueSpecs->count() > 0)
@foreach($uniqueSpecs as $spec)
{{ $spec->spec_name }}: {{ $spec->spec_value }}{{ $spec->spec_unit ? ' ' . $spec->spec_unit : '' }}
@endforeach
@else
No specifications
@endif
|
Click the "Add New Model" button to create your first model for this master.