@foreach($specCategories as $specCategory => $upgrades) @if($upgrades instanceof \App\Models\Spec) @php $spec = $upgrades; @endphp
@if($spec->title && !$spec->description)
{{$specCategory}}
{{$spec->title}}
@elseif($spec->title && $spec->description)
{{$specCategory}}
@if($spec->description)
{!!nl2br($spec->description)!!}
@endif @elseif(!$spec->title)
{{$specCategory}}
@if($spec->description)
{!!nl2br($spec->description)!!}
@endif @endif
@else @php $upgradeDesc = null; @endphp
{{$specCategory}}
@if(count(collect($upgrades)->sortBy('price')->toArray())>1) @else
{{ $upgradeName }}@if($upgrade['price']>0)  +{{ $upgrade['price']}}₪ @endif @endif
@if($upgradeDesc??'') {!! $upgradeDesc !!} @else {!! $upgrades[$index0]['description'] !!} @endif
@endif @endforeach