?
@extends('homepage.layout-marketplace', [
'webtitle' => 'Testimonials',
'summary' => '',
'keywords' => '',
'author' => '',
'createdate' => '',
'ogimage' => '',
])
@section('content')
<section class="common-header">
<div class="header-content">
<img class="../userassets/bkg.jpg">
<div class="header-title">
<div class="container">
<h2>Testimonials</h2>
</div>
</div>
</div>
</section>
<section class="testimonial-page ">
<div class="container">
<div class="testi-title text-center">
<h5 class="text-center">Testimonial</h5>
</div>
<h2 class="text-center"> Our Happy Clients </h2>
<div id="testimonialCarousel" class="carousel slide testimonial-carousel mt-5" data-bs-ride="carousel">
<div class="carousel-indicators">
<button type="button" data-bs-target="#testimonialCarousel" data-bs-slide-to="0" class="active"
aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#testimonialCarousel" data-bs-slide-to="1"
aria-label="Slide 2"></button>
<button type="button" data-bs-target="#testimonialCarousel" data-bs-slide-to="2"
aria-label="Slide 3"></button>
</div>
<div class="row">
<div class="col-xl-12 col-md-12 mb-3">
<div class="testimonial-card1 fade-in text-center">
<div class="testimonial-inner">
@foreach ($testimonials as $customer)
<div class="testimonial-item {{ $loop->first ? 'active' : '' }}">
<div class="img-wrapper text-center">
<img src="{{ $customer->avatar_path ? asset('storage/' . $customer->avatar_path) : asset('userassets/user2.jpg') }}"
class="d-block" alt="{{ $customer->name }}'s avatar" style="width: 120px">
</div>
<div class="testi-cont text-center ">
<div class="customer-content1">
<p>"{{ $customer->content }}"</p>
</div>
<div class="customer-name">
<h4 class="mb-1">{{ $customer->name }}</h4>
<h6>{{ $customer->position }}, {{ $customer->company }}</h6>
<div class="review-star-icon fs-13 lh-20">
@for ($i = 0; $i < $customer->rating; $i++)
<i class="bi bi-star-fill"></i>
@endfor
</div>
</div>
</div>
</div>
@endforeach
</div>
</div>
</div>
</div></div>
</div>
<div class='container'>
<div class="d-flex justify-content-center">
{{$testimonials->links() }}
</div>
</div>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "CollectionPage",
"name": "Customer Testimonials",
"mainEntity": [
@php
$totalRating = 0;
$reviewCount = count($testimonials);
@endphp
@foreach($testimonials as $index => $customer)
{
"@type": "Review",
"author": {
"@type": "Person",
"name": "{{ $customer->name }}"
},
"reviewRating": {
"@type": "Rating",
"ratingValue": "{{ $customer->rating }}",
"bestRating": "5"
},
"itemReviewed": {
"@type": "Organization",
"name": "Face Investigations"
},
"reviewBody": "{{ $customer->content }}"
}{{ $index < $reviewCount - 1 ? ',' : '' }}
@php
$totalRating += $customer->rating;
@endphp
@endforeach
],
@if($reviewCount > 0)
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "{{ number_format($totalRating / $reviewCount, 1) }}",
"reviewCount": "{{ $reviewCount }}"
}
@endif
}
</script>
</section>
@stop