@if ($input['accept'] != '')
{{-- --}}
{{-- --}} @if(isset($input['no_multi'])) تحميل الملف @else تحميل الملفات @endif
Loading...
@endif
@if (!empty($input['value']) && is_array($input['value']) && count($input['value'])>0)
@foreach ($input['value'] as $value) @if(!empty($value)) @php $imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp']; // Add more if needed $path = $value; // Your file path // Get the file extension $extension = pathinfo($value, PATHINFO_EXTENSION); // Check if the extension is in the list of image extensions $isImage = in_array(strtolower($extension), $imageExtensions); $isPdf = $extension =='pdf'; $isMp4 = $extension =='mp4'; $isMp3 = $extension =='mp3'; $isDocx=false; if ($extension == 'docx' or $extension == 'xls' or $extension == 'ppt' or $extension == 'doc' or $extension == 'xls') { $isDocx = true; } @endphp
{{-- type== image --}}
@if ($input['accept'] != '') @if(!isset($input['no_multi'])) @if(!isset($input['accpt'])) @endif @elseif (in_array($value,$input['value2']) || !empty($input['download'])) عرض | @endif @endif @if ($isDocx) {{-- تحميل --}} {{-- @php $filename = str_replace('/', '--', asset($value)); @endphp عرض --}} @endif {{-- @if ($isPdf) عرض @endif @if($isMp4) شاهد الفديو @endif --}} @if($isImage) @endif {{-- @if($isMp3) @endif --}} @if ($input['accept'] != '') @endif {{-- @if(!$isMp3 and !$isImage) {{ basename($value) }} @endif --}} @php $filePath = str_replace('/', '--', $value); @endphp عرض {{ basename($value) }}
{{--
{{ $value }}
--}} @endif @endforeach
@endif
@if(isset($input['no_multi'])) @endif @section('scripts') @endsection