HEX
Server: LiteSpeed
System: Linux sv4.hami.host 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User: armgroup (1008)
PHP: 8.2.32
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open, mail, socket_create, socket_create_listen, socket_create_pair, link, dl, openlog, syslog, stream_socket_server, curl_multi_init
Upload Files
File: //home/armgroup/libs/resources/views/frontend/compare/index.blade.php
@extends('layouts.app')
@section('header')
    <link rel="stylesheet" href="{{ asset('css/compare.css?v=0.0.3') }}"/>
@endsectio
@section('content')
    <div class="container-fluid my-5 body-content">
        <div class="card p-5">
            <div class="row">
                <div class="col-12 p-0">
                    <h2 class="text-center">
                        <span>مقایسه</span>
                    </h2>
                </div>
            </div>
            <hr>
            <div class="row">
                @foreach($products as $product)
                    <div class="col-3">
                        <div class="card">
                            <form class="w-25 mx-auto" action="{{ route('compare.destroy', $product->id) }}" method="POST">
                                @csrf
                                @method('DELETE')
                                <button class="btn btn-sm btn-danger w-100" type="submit"><span class="fa fa-times"></span> حذف</button>
                            </form>
                            <a href="{{ route('products.show', $product->slug) }}">
                                <img class="card-img-top" src="{{ asset($product->image) }}" alt="{{ $product->name }}">
                            </a>
                            <div class="card-body">
                                <h5 class="card-title">
                                    <a href="{{ route('products.show', $product->slug) }}" class="text-info">
                                        {{ $product->name }}
                                    </a>
                                </h5>
                                <p class="card-text">
                                <table class="table">
                                    <tr>
                                        <th>برند</th>
                                        <td>{{ $product->brand->name ?: '-' }}</td>
                                    </tr>
                                    @foreach($category->attributeGroups as $attributeGroup)
                                        <tr>
                                            <th colspan="2" class="text-secondary text-center">{{ $attributeGroup->name }}</th>
                                        </tr>
                                        @foreach($attributeGroup->attributes as $attribute)
                                            <tr>
                                                <th>{{ $attribute->name }}</th>
                                                <td>{{ $product->values->firstWhere('attribute_id', $attribute->id)?->value ?: '-' }}</td>
                                            </tr>
                                        @endforeach
                                    @endforeach
                                </table>
                                </p>
                            </div>
                        </div>
                    </div>
                @endforeach
            </div>
        </div>
    </div>
@endsection