File: /var/www/html/storage/framework/views/7e821b5f0b8abc6affd641fe2ff4ae95.php
<div class="container mt-4">
<hr>
<div class="row align-items-center wow fadeInUp" data-wow-delay="300ms">
<div class="col-lg-9">
<div class="main-title2">
<h2 class="title">Services</h2>
</div>
</div>
<div class="col-lg-3">
</div>
<div class="row">
<div class="col-lg-12">
<div class="navi_pagi_top_right slider-4-grid owl-carousel owl-theme">
<!--[if BLOCK]><![endif]--><?php $__currentLoopData = $gigs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gig): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php
// Get a random image from the gig's image URLs
$imageUrls = $gig['image_urls'];
$randomImageUrl = $imageUrls[array_rand($imageUrls)];
// Calculate the average star rating
$reviews = $gig['reviews'];
$totalReviews = count($reviews);
$sumRatings = array_sum(array_column($reviews, 'star_rating'));
$averageRating = $totalReviews > 0 ? $sumRatings / $totalReviews : 0;
?>
<div class="item">
<div class="listing-style1 bdrs16">
<div class="list-thumb">
<a href="<?php echo e(route('show.service.page', $gig['slug'])); ?>"> <img style="width: 100%; height: 120px; object-fit: cover;" src="<?php echo e($randomImageUrl); ?>" alt="<?php echo e($gig['title']); ?>"></a>
<!--[if BLOCK]><![endif]--><?php if(auth()->guard()->guest()): ?>
<a href="<?php echo e(route('add.favorite', $gig['slug'])); ?>" class="listing-fav fz12"><span class="far fa-heart"></span></a>
<?php endif; ?><!--[if ENDBLOCK]><![endif]-->
<!--[if BLOCK]><![endif]--><?php if(auth()->guard()->check()): ?>
<a href="<?php echo e(route('add.favorite', $gig['slug'])); ?>" class="listing-fav fz12"><span class="far fa-heart"></span></a>
<?php endif; ?><!--[if ENDBLOCK]><![endif]-->
</div>
<div class="list-content">
<a href="<?php echo e(route('show.category.services', $gig['category']['slug'])); ?>">
<p class="list-text body-color fz14 mb-1 me-4"><?php echo e($gig['category']['name']); ?>
<!--[if BLOCK]><![endif]--><?php if($averageRating > 0): ?>
<i class="fas fa-star fz10 review-color me-0"></i> <?php echo e(number_format($averageRating, 1)); ?>
<?php endif; ?><!--[if ENDBLOCK]><![endif]-->
</p>
</a>
<h5 class="list-title line-clamp2"><a href="<?php echo e(route('show.service.page', $gig['slug'])); ?>"><?php echo e(\Illuminate\Support\Str::limit($gig['title'], 21)); ?></a></h5>
<hr class="my-1">
<div class="list-meta d-flex justify-content-between align-items-center mt15">
<a class="d-flex" href="<?php echo e(route('show.shop.services', $gig['shop']['slug'])); ?>">
<span class="position-relative mr10">
<img style="border: 2px solid #4CAF50; width: 40px; height: 40px; border-radius: 50%; object-fit: cover;" src="<?php echo e($gig['shop']['profile_photo_url']); ?>" alt="<?php echo e($gig['shop']['name']); ?>">
</span>
</a>
<div class="budget">
<p class="mb-0 body-color"><span class="fz17 fw500 dark-color ms-1"><?php echo e($gig['currency']); ?><?php echo e(number_format($gig['price'],2)); ?></span></p>
</div>
</div>
</div>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><!--[if ENDBLOCK]><![endif]-->
</div>
</div>
</div>
<div class="text-end text-lg-end mb-4">
<a class="ud-btn btn-light-thm bdrs90" href="<?php echo e(route('services.page')); ?>">See more<i class="fal fa-arrow-right-long"></i></a>
</div>
</div>
</div><?php /**PATH /var/www/html/resources/views/livewire/web/nearby-service.blade.php ENDPATH**/ ?>