@php
$datas = implode(',', $form_upload);
$files = explode(',', $datas);
@endphp
@foreach($files as $file)
@php
$url = Storage::url(config('constants.doc_path').'/'.$file);
$path = public_path('uploads/'.config('constants.doc_path').'/'.$file);
@endphp
@if(file_exists($path))
@php
$media = explode('_', $file, 2);
$file_name = !empty($media[1]) ? $media[1]: $media[0];
@endphp
@if(in_array(mime_content_type($path), ['image/jpeg', 'image/png', 'image/webp']))
@else
{{$file_name}}
@endif
@endif
@endforeach