@php
$acceptable_files = [
'images' => ['png', 'gif', 'bmp', 'svg', 'jpg', 'jpeg', 'webp'],
'videos' => ['mp4', 'mov', 'avi', 'wmv', 'mkv'],
'audio' => ['wav', 'mp3', 'm4a', 'mpga', 'wma']
];
@endphp
@foreach ($files as $file )
@if (array_search($file->extension() , $acceptable_files['images']) != false)
 }})
@endif
@if (array_search($file->extension() , $acceptable_files['videos']) != false)
 }})
@endif
@if (array_search($file->extension() , $acceptable_files['audio']) != false)
 }})
@endif
@endforeach