@php $data = []; $data['title'] = "Manage Press Release"; @endphp @include('backend.components.header_link', $data)
@include('backend.components.menu')
@include('backend.components.navbar', $data)
@if (session('success')) @endif @section('adminsection')

@foreach($testimonials as $testimonial) @endforeach
# Title Video Actions
{{ $loop->iteration }} {{ $testimonial->title }} @if($testimonial->type == 'video') @php // Extract YouTube Video ID preg_match('/(youtu\.be\/|v=)([^&]+)/', $testimonial->youtube_url, $matches); $videoId = $matches[2] ?? ''; @endphp @if($videoId) @else View Video @endif @elseif($testimonial->type == 'photo') @endif
@csrf @method('DELETE')
Edit Testimonial
@csrf @method('PUT')
@php function getYouTubeId($url) { preg_match('/(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|.*[?&]v=|shorts\/))([^"&?\/\s]{11})/', $url, $matches); return $matches[1] ?? null; } @endphp
@include('backend.components.footer') @include('backend.components.footer_link')