@php
$fileExtension = pathinfo($data->link_preview, PATHINFO_EXTENSION);
$imageTypes = ['jpg', 'jpeg', 'png', 'gif', 'svg', 'avif'];
$videoTypes = ['mp4', 'avi', 'mov', 'mkv'];
@endphp
@if (in_array(strtolower($fileExtension), $imageTypes))
@elseif (in_array(strtolower($fileExtension), $videoTypes))
@if(!empty($check) && $check == 1)
{{-- Video : Controls Custom --}}
@endif
@php $check = 0 @endphp