@extends('front-end.layouts.apps')
@section('title')
    Details
@endsection
@section('page_title')
    Details
@endsection
@section('main_container')
    <div class="container" dir="rtl">
        <div class="row">
            <div class="card " id="main_card">
                <div class="card-body">
                    <div class="row">
                        @foreach ($videos as $row)
                            <div class="col-md-5 mb-3">
                                <div style="height: 200px" class="bg-image hover-overlay ripple shadow-2-strong rounded-5"
                                    data-mdb-ripple-color="light">
                                    @php
                                        $url = $row->url;
                                        $whitelist = ['YouTube', 'Vimeo', 'FaceBook'];
                                        $params = [
                                            'autoplay' => 1,
                                            'loop' => 1,
                                        ];
                                        $attributes = [
                                            'type' => null,
                                            'class' => 'iframe-class',
                                            'data-html5-parameter' => true,
                                        ];
                                        echo LaravelVideoEmbed::parse($url, $whitelist);
                                    @endphp
                                </div>
                            </div>
                            <div class="col-md-7 mb-3">
                                <h4><strong>{{ $row->title }}</strong></h4>
                                <p class="text-muted">
                                    {!! Str::limit($row->body, 300) !!}
                                </p>
                               
                            </div>
                        @endforeach

                    </div>

                </div>
            </div>

        </div>
        <div class="row mt-3">
            <div class="col-md-12">
                {{ $videos->links('pagination::bootstrap-4') }}
            </div>
        </div>
    </div>
@endsection
