@extends("layout.app") @section("content")

مقارنة اجهزة ال {{$category->title}}

slug)}}">
@if($agent->isDesktop() )
@endif
@php $latest_item = \App\Models\Spec::where("title",request()->get("c1")??$c_items[0]->title)->first()->items()->latest()->first(); $sub_category_1 = $latest_item->category; @endphp
@php $item_colors_sorted = $latest_item->colors->sortBy(function($q) {return $q->color->order;});@endphp first()->image_default}")}}" alt=""> @foreach($latest_item->item_colors as $color) image_default)}}"> @endforeach @php $item_colors_sorted = $latest_item->colors->sortBy(function($q) {return $q->color->order;});@endphp @if(count($item_colors_sorted) > 0)
@foreach($item_colors_sorted as $color)
quantity==0?'title="غير متوفر"':""!!} style="display: block; margin: 0 auto; background:{{$color->color->color}}" class="color-chooser" type="radio" id="c1-{{$color->color->id}}" name="c1-color-{{$latest_item->id}}" value="{{$color->color->id}}" @if($loop->index==0) checked @endif>
@endforeach
@endif
@php $latest_item = \App\Models\Spec::where("title",request()->get("c2")??$c_items[1]->title)->first()->items()->latest()->first(); $sub_category_2 = $latest_item->category; @endphp
@php $item_colors_sorted = $latest_item->colors->sortBy(function($q) {return $q->color->order;});@endphp first()->image_default}")}}" alt=""> @foreach($latest_item->item_colors as $color) image_default)}}"> @endforeach @php $item_colors_sorted = $latest_item->colors->sortBy(function($q) {return $q->color->order;});@endphp @if(count($item_colors_sorted) > 0)
@foreach($item_colors_sorted as $color)
quantity==0?'title="غير متوفر"':""!!} style="display: block; margin: 0 auto; background:{{$color->color->color}}" class="color-chooser" type="radio" id="c2-{{$color->color->id}}" name="c2-color-{{$latest_item->id}}" value="{{$color->color->id}}" @if($loop->index==0) checked @endif>
@endforeach
@endif
@if($agent->isDesktop())
@php $latest_item = \App\Models\Spec::where("title",request()->get("c3")??$c_items[2]->title)->first()->items()->latest()->first(); $sub_category_3 = $latest_item->category; @endphp
@php $item_colors_sorted = $latest_item->colors->sortBy(function($q) {return $q->color->order;});@endphp first()->image_default}")}}" alt=""> @foreach($latest_item->item_colors as $color) image_default)}}"> @endforeach @php $item_colors_sorted = $latest_item->colors->sortBy(function($q) {return $q->color->order;});@endphp @if(count($item_colors_sorted) > 0)
@foreach($item_colors_sorted as $color)
quantity==0?'title="غير متوفر"':""!!} style="display: block; margin: 0 auto; background:{{$color->color->color}}" class="color-chooser" type="radio" id="c3-{{$color->color->id}}" name="c3-color-{{$latest_item->id}}" value="{{$color->color->id}}" @if($loop->index==0) checked @endif>
@endforeach
@endif
@endif
@php $tab_1 = \App\Models\Spec::where("title",request()->get("c1")??$c_items[0]->title)->first() ;@endphp @php $tab_2 = \App\Models\Spec::where("title",request()->get("c2")??$c_items[1]->title)->first() ;@endphp @if($agent->isDesktop()) @php $tab_3 = \App\Models\Spec::where("title",request()->get("c3")??$c_items[2]->title)->first() ;@endphp @endif
@foreach($spec_categories as $spec_category)

{{$spec_category->title}}

@php $spec_1 = \App\Models\Spec::where("title",request()->get("c1") ??$c_items[0]->title)->first(); $items_1 = $spec_1->items->pluck("id"); @endphp @if($spec_category->is_upgradable)