<?php
$ext = pathinfo($value, PATHINFO_EXTENSION);
$images_type = array('jpg', 'png', 'gif', 'jpeg', 'bmp', 'tiff','mp3','wav','ogg','mp4','mkv','avi');
if(Storage::exists($value) || file_exists($value)):
if(in_array(strtolower($ext), $images_type)):?>
<a data-lightbox='roadtrip' href='{{asset($value)}}'><img style='max-width:150px' title="Image For {{$form['label']}}" src='{{asset($value)}}'/></a>
<?php else:?>
<a href='{{asset($value)}}?download=1' target="_blank">{{trans("crudbooster.button_download_file")}}: {{basename($value)}} <i class="fa fa-download"></i></a>
 <!--/ <a href='{{ URL::to("preview")."/".url(asset($value)) }}' target="_blank">Preview<i class="fa fa-eye"></i></a>-->

@if(strtolower($ext) == 'pdf')
<div style="display:block;" id="{{$form['label']}}">
    <embed type="application/pdf" src="{{ asset($value) }}" width="600" height="400"></embed>
</div>
@endif

<?php endif;?>
<?php endif;?>
