<?php
$testimonials = App\Models\Testimonial::all();
?>

<!-- testimonial2 section start -->
<section class="td-testimonial-2">
    <div class="container">
        <div class="td-testimonial-2-box">
            <div class="swiper myTestimonial2">
                <div class="swiper-wrapper">
                    @foreach ($testimonials as $testimonial)
                        <div class="swiper-slide">
                            <div class="td-testimonial-2-box-card">
                                <div class="row g-4">
                                    <div class="col-sm-7 col-md-8">
                                        <div class="td-testimonial-2-box-card-full">
                                            <div class="td-testimonial-2-box-card-text">
                                                <p>“<span class="truncate-text">
                                                        {{ $testimonial->message }}
                                                    </span>”</p>
                                            </div>
                                            <div class="td-testimonial-2-box-card-userInfo">
                                                <h5>{{ $testimonial->name }}</h5>
                                                <p>{{ $testimonial->designation }}</p>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-5 col-md-4">
                                        <div class="td-testimonial-2-box-card-img">
                                            <img src="{{ asset($testimonial->picture) }}"
                                                alt="{{ $testimonial->name }}">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    @endforeach
                </div>
            </div>
            <div class="td-testimonial-2-box-swipperMoveButton">
                <div class="swiperTestimonial-button-prev swiperTestimonial-button">
                    <svg xmlns="http://www.w3.org/2000/svg" width="8" height="14" viewBox="0 0 8 14"
                        fill="none">
                        <path d="M6.99995 1C6.99995 1 1.00001 5.41893 0.999999 7.00005C0.999986 8.58116 7 13 7 13"
                            stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
                    </svg>
                </div>
                <div class="swiperTestimonial-button-next swiperTestimonial-button">
                    <svg xmlns="http://www.w3.org/2000/svg" width="8" height="14" viewBox="0 0 8 14"
                        fill="none">
                        <path d="M1.00005 1C1.00005 1 6.99999 5.41893 7 7.00005C7.00001 8.58116 1 13 1 13"
                            stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
                    </svg>
                </div>
            </div>
        </div>
    </div>
    <div class="td-testimonial-2-element">
        <img src="{{ asset('frontend/default/img/testimonial/testimonial-shape-1.png') }}" alt="">
    </div>
</section>
<!-- testimonial2 section end -->
