Commit 9d9ae754 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Add video.php helper referenced in composer autoload

Fixes deploy build failure: composer dump-autoload couldn't find
app/Helpers/video.php which is required by composer.json autoload.files.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 3fe6c37b
<?php
if (!function_exists('video_embed_url')) {
function video_embed_url(string $url): ?string
{
if (preg_match('/(?:youtube\.com\/watch\?v=|youtu\.be\/)([\w-]+)/', $url, $m)) {
return "https://www.youtube.com/embed/{$m[1]}";
}
if (preg_match('/vimeo\.com\/(\d+)/', $url, $m)) {
return "https://player.vimeo.com/video/{$m[1]}";
}
return null;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment