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j '  'P$a ( `D$Na L?u80e J,K˷NI'0eݷ(NI'؀ 2ipIIKp`:O'`ʤxB8Ѥx Ѥx $ $P6 :vRNb 'p,>NB 'P]-->P T+*^h& p '‰a ‰ (ĵt#u33;Nt̵'ޯ; [3W ~]0KH1q@8]O2]3*̧7# *p>us p _6]/}-4|t'|Smx= DoʾM×M_8!)6lq':l7!|4} '\ne t!=hnLn (~Dn\+‰_4k)0e@OhZ`F `.m1} 'vp{F`ON7Srx 'D˸nV`><;yMx!IS钦OM)Ե٥x 'DSD6bS8!" ODz#R >S8!7ّxEh0m$MIPHi$IvS8IN$I p$O8I,sk&I)$IN$Hi$I^Ah.p$MIN$IR8I·N "IF9Ah0m$MIN$IR8IN$I 3jIU;kO$ɳN$+ q.x* tEXtComment

Viewing File: /home/u460558712/domains/mintsdome.online/public_html/resources/views/marketplace/show.blade.php

@extends('layouts.app')

@push('content')


    <!-- title page -->


    <!-- tf item details -->
    <div class="tf-section tf-item-details style-2"><br><br><br>
        <div class="themesflat-container">
            <div class="row">
                <div class="col-xl-6 col-md-12">
                    <div class="content-left">
                        <div class="media">
                            <img src="{{ image_url($item->nft_image) }}" alt="" style="width: 700px; height: 500px;">

                        </div>
                    </div>
                </div>
                <div class="col-xl-6 col-md-12">
                    <div class="content-right">
                        <div class="sc-item-details">
                            <div class="meta-item">
                                <div class="left">
                                    <h2>{{ $item->nft_name }}</h2>
                                </div>
                                <div class="right">
                                    {{-- <span class="viewed eye mg-r-8">225</span> --}}

                                    @auth
                                        @php
                                            // Check if the user has liked this item
                                            $liked = Auth::user()
                                                ->likes()
                                                ->where('nft_id', $item->id)
                                                ->exists();
                                            $likeCount = $item->likes()->count(); // Get the total like count for this item
                                        @endphp

                                        <span class="liked heart wishlist-button {{ $liked ? 'active' : '' }}"
                                            data-id="{{ $item->id }}" onclick="toggleLike({{ $item->id }})">
                                            <span class="number-like">{{ $likeCount }}</span>
                                        </span>
                                    @else
                                        <span class="liked heart wishlist-button" disabled>
                                            <span class="number-like">{{ $item->likes()->count() }}</span>
                                        </span>
                                    @endauth

                                </div>
                            </div>
                            <div class="client-infor sc-card-product">
                                <div class="meta-info">
                                    <div class="author">
                                        <div class="avatar">
                                            <img src="{{ image_url(optional($item->user)->image) }}" alt="">
                                        </div>
                                        <div class="info">
                                            <span>Owned By</span>
                                            <h6> <a href="{{ route('user', $item->user_id) }}">{{ $item->user->name }}</a>
                                            </h6>
                                        </div>
                                    </div>
                                </div>
                                <div class="meta-info">
                                    <div class="author">
                                        <div class="avatar">
                                            <img src="{{ image_url(optional($item->oldUser)->image) }}" alt="">
                                        </div>
                                        <div class="info">
                                            <span>Create By</span>
                                            <h6> <a
                                                    href="{{ route('user', $item->old_user_id) }}">{{ $item->oldUser ? $item->oldUser->name : 'Unknown User' }}</a>
                                            </h6>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <p>{{ $item->nft_description }}</p>
                            <div class="meta-item-details">
                                <div class="item-style-2 item-details">
                                    <ul class="list-details">
                                        <li><span>Artist : </span>
                                            <h6>{{ $item->user->name }}</h6>
                                        </li>
                                        <li><span>Service Fee : </span>
                                            @php
                                                $userBalance = get_settings('bidding_fee'); // Corrected variable name
                                                $ethPrice = $ethPrice ?? 1; // Default to 1 to avoid division by zero
                                                $balanceInEth = $ethPrice > 0 ? $userBalance / $ethPrice : 0; // Convert balance to ETH
                                            @endphp

                                            <script>
                                                const conversionRate = {{ $ethPrice }};
                                                console.log("Current Ethereum Price in USD:", conversionRate);
                                            </script>

                                            <h6>{{ number_format($balanceInEth, 5) }}
                                                {{ get_settings('wallet_address_network', 'ETH') }}</h6>
                                        </li>
                                        <li><span>Collection : </span>
                                            <h6>{{ $item->category->category_name }}</h6>
                                        </li>
                                    </ul>
                                </div>
                                <div class="item-style-2">
                                    <div class="item meta-price">
                                        <span class="heading">Price</span>
                                        <div class="price">
                                            <div class="price-box">
                                                @php
                                                    $ethPrice = getEthPrice();
                                                    $nftPriceInUsd = $item->nft_price * $ethPrice; // Calculating the NFT price in USD
                                                @endphp
                                                <h5> {{ $item->nft_price }} ETH = ${{ number_format($nftPriceInUsd, 2) }}
                                                </h5>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="item count-down">
                                        <span class="js-countdown" data-timer="416400" data-labels=" :  ,  : , : , "></span>
                                    </div>
                                </div>
                            </div>

                            @if ($item->user_id === Auth::id())
                                <!-- Show Edit button if the current user is the owner -->
                                <a href="{{ route('edit.nft', $item->id) }}"
                                    class="sc-button loadmore style bag fl-button pri-3">
                                    <span>Edit</span>
                                </a>
                            @elseif (Auth::check() && $item->user_id !== Auth::id())
                                <!-- Show 'Buy Now' button if the user is logged in and is not the owner -->
                                <form action="{{ route('nft.buy', $item->id) }}" method="POST" id="bid-form">
                                    @csrf
                                    <a href="#" class="sc-button loadmore style bag fl-button pri-3"
                                        onclick="document.getElementById('bid-form').submit();">
                                        <span>Buy Now</span>
                                    </a>
                                </form>
                            @elseif ($item->status === '1')
                                <!-- Show login prompt if the user is not logged in -->
                                <a href="{{ url('login') }}" class="sc-button loadmore style bag fl-button pri-3">
                                    <span>Place a bid</span>
                                </a>

                            @else
                                <!-- Show Disabled button if the item is not available for sale -->
                                <a href="{{ route('user', $item->user_id) }}"
                                    class="sc-button loadmore style bag fl-button pri-3">
                                    <span>Disabled</span>
                                </a>
                            @endif


                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- /tf item details -->

    <section class="tf-section live-auctions item-details pad-b-74 mobie-style">
        <div class="themesflat-container">
            <div class="row">
                <div class="col-md-12">
                    <div class="heading-live-auctions">
                        <h2 class="tf-title">
                            Live Auctions</h2>
                        <a href="{{ url('marketplace') }}" class="exp">EXPLORE MORE</a>
                    </div>
                </div>
                <div class="col-md-12">
                    <div class="swiper-container show-shadow carousel pad-t-24 auctions">
                        <div class="swiper-wrapper">
                            @foreach ($items as $item)
                                <div class="swiper-slide">
                                    <div class="slider-item">
                                        <div class="sc-card-product">
                                            <div class="card-media">
                                                <a href="{{ route('marketplace.show', $item->id) }}"><img
                                                        src="{{ asset_url('images/' . ($item->nft_image ?? 'card-item-3.jpg')) }}"
                                                        alt="Image"></a>

                                                @auth
                                                    @php
                                                        // Check if the user has liked this item
                                                        $liked = Auth::user()
                                                            ->likes()
                                                            ->where('nft_id', $item->id)
                                                            ->exists();
                                                        $likeCount = $item->likes()->count(); // Get the total like count for this item
                                                    @endphp

                                                    <button class="wishlist-button heart {{ $liked ? 'active' : '' }}"
                                                        data-id="{{ $item->id }}"
                                                        onclick="toggleLike({{ $item->id }})">
                                                        <span class="number-like">{{ $likeCount }}</span>
                                                    </button>
                                                @else
                                                    <button class="wishlist-button heart" disabled>
                                                        <span class="number-like">{{ $item->likes()->count() }}</span>
                                                    </button>
                                                @endauth

                                                <div class="featured-countdown">
                                                    <span class="slogan"></span>
                                                    <span class="js-countdown" data-timer="516400"
                                                        data-labels=" :  ,  : , : , "></span>
                                                </div>

                                            </div>
                                            <div class="card-title">
                                                <h5><a
                                                        href="{{ route('marketplace.show', $item->id) }}">{{ $item->nft_name }}</a>
                                                </h5>
                                                <div class="tags">{{ get_settings('wallet_address_network', 'ETH') }}
                                                </div>
                                            </div>
                                            <div class="meta-info">
                                                <div class="author">
                                                    <div class="avatar">
                                                        <img src="{{ asset_url('images/' . $item->user->image) }}"
                                                            alt="Image">
                                                    </div>
                                                    <div class="info">
                                                        <span>Creator</span>
                                                        <h6> <a
                                                                href="{{ route('user', $item->user_id) }}">{{ $item->user->name }}</a>
                                                        </h6>
                                                    </div>
                                                </div>
                                                <div class="price">
                                                    <span>Current Bid</span>
                                                    <h5> {{ $item->nft_price }}
                                                        {{ get_settings('wallet_address_network', 'ETH') }}</h5>
                                                </div>
                                            </div>
                                        </div>
                                    </div><!-- item-->
                                </div>
                            @endforeach

                        </div>
                        <div class="swiper-pagination mg-t-12"></div>
                        <div class="swiper-button-next btn-slide-next active"></div>
                        <div class="swiper-button-prev btn-slide-prev"></div>
                    </div>
                </div>
            </div>
        </div>
    </section>





@endpush
Back to Directory=ceiIENDB`