@php
// Function to extract YouTube video ID from any valid YouTube URL
function getYoutubeVideoId($url) {
preg_match('/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/', $url, $matches);
return $matches[1] ?? null;
}
// Your YouTube URL (you can also pass this from the controller)
$videoUrl = $product->video_link;
$videoId = getYoutubeVideoId($videoUrl);
@endphp
{{ __('messages.ACTIVITIES SHOWCASING OF THE PROJECT') }}
{{ __('messages.Impacts of the Project') }}
{{ __('messages.Why we need to help people?') }}
{{ __('messages.Latest News') }}
{{ __('messages.ABOUT PROJECT') }}
{!! $product->description !!}
{{ __('messages.Work Report') }}
{{ $report->title }}
{!! $report->description !!}
Photo Gallery
@endforeach