File: /var/www/html/storage/framework/views/40e2175598706fb521363ff40062e7f9.php
<div>
<section>
<div class="mt-10 container">
<div class="row">
<div class="col-lg-12">
<div class="listings_category_nav_list_menu">
<ul class="mb0 d-flex ps-0">
<!--[if BLOCK]><![endif]--><?php $__currentLoopData = collect($cats)->shuffle()->take(10); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li><a href="<?php echo e(route('show.category.services', $cat['slug'])); ?>"><?php echo e($cat['name']); ?></a></li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><!--[if ENDBLOCK]><![endif]-->
</ul>
</div>
</div>
</div>
</div>
</section>
<div class="row px-4 py-0">
<div class="col-lg-12">
<!--[if BLOCK]><![endif]--><?php if($gigs): ?>
<div class="row">
<h2 class="mb-4">Nearby Services</h2>
<!--[if BLOCK]><![endif]--><?php $__currentLoopData = $gigs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gig): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="col-6 col-md-3 mb-4">
<?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 href="<?php echo e(route('add.favorite', $gig['slug'])); ?>" class="listing-fav fz12"><span class="far fa-heart"></span></a>
</div>
<div class="list-content">
<p
class="list-text body-color fz14 mb-1"
x-data="{ isLargeScreen: window.innerWidth >= 992 }"
x-init="window.addEventListener('resize', () => isLargeScreen = window.innerWidth >= 992)"
>
<span x-text="isLargeScreen ? '<?php echo e($gig['category']['name']); ?>' : '<?php echo e(\Illuminate\Support\Str::limit($gig['category']['name'], 14, '...')); ?>'">
</span>
<!--[if BLOCK]><![endif]--><?php if($averageRating > 0): ?>
<i class="fas fa-star fz10 review-color me-1"></i> <?php echo e(number_format($averageRating, 1)); ?>
<?php endif; ?><!--[if ENDBLOCK]><![endif]-->
</p>
<h5 class="list-title line-clamp2 fz12"><a href="<?php echo e(route('show.service.page', $gig['slug'])); ?>"><?php echo e($gig['title']); ?></a></h5>
<hr class="my-2">
<div class="list-meta d-flex justify-content-between align-items-center mt15">
<a class="d-flex" href="<?php echo e(route('show.service.page', $gig['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>
<span class="fz14 d-none d-lg-inline"><?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'])); ?></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><!--[if ENDBLOCK]><![endif]-->
</div>
<?php else: ?>
<div class="text-end text-lg-end mb-4">
<button class="ud-btn btn-light-thm btn-primary bdrs90 w-100"> No services available </button>
</div>
<?php endif; ?><!--[if ENDBLOCK]><![endif]-->
<!--[if BLOCK]><![endif]--><?php if($canLoadMore): ?>
<div class="text-end text-lg-end mb-4">
<button wire:click="loadGigs" class="ud-btn btn-light-thm btn-primary bdrs90 w-100">
Load more <i class="fal fa-arrow-right-long"></i>
</button>
</div>
<?php endif; ?><!--[if ENDBLOCK]><![endif]-->
</div>
</div>
</div>
<?php /**PATH /var/www/html/resources/views/livewire/pages/services.blade.php ENDPATH**/ ?>