@php
$identity_file = "";
$ssn_file = "";
$state_file = "";
$other_doc_file = "";
@endphp
   @if (!empty($upload_medias))
       @foreach ($upload_medias as $upload_media)
           @if ($upload_media->image_type_id == config('constant.IDENTIFICATION_IMAGE_ID'))
               @php $identity_file = config('constant.UPLOAD_MEDIA_PATH') . DIRECTORY_SEPARATOR.$upload_media->user_id . DIRECTORY_SEPARATOR . $upload_media->image_path @endphp
           @endif
           @if ($upload_media->image_type_id == config('constant.SSN_IMAGE_ID'))
               @php $ssn_file = config('constant.UPLOAD_MEDIA_PATH') . DIRECTORY_SEPARATOR.$upload_media->user_id . DIRECTORY_SEPARATOR . $upload_media->image_path @endphp
           @endif
           @if ($upload_media->image_type_id == config('constant.STATE_PHOTO_IMAGE_ID'))
               @php  $state_file = config('constant.UPLOAD_MEDIA_PATH') . DIRECTORY_SEPARATOR.$upload_media->user_id . DIRECTORY_SEPARATOR . $upload_media->image_path @endphp
           @endif
           @if ($upload_media->image_type_id == config('constant.MAIL_DOC_IMAGE_ID'))
               @php  $other_doc_file = config('constant.UPLOAD_MEDIA_PATH') . DIRECTORY_SEPARATOR.$upload_media->user_id . DIRECTORY_SEPARATOR . $upload_media->image_path @endphp
           @endif
       @endforeach
   @endif

<div class="col-md-6 ">
    <label class="lbl-file">Please upload document Proof of PHOTO IDENTIFICATION (ie
        Drivers License or State Identification Card)</label>
    @include('partials.file_size_label')
    <input id="identity_proof_file" type="file" onchange="return common_helper.fileSizeValidation(this,{{$max_file_size}})"  class="form-control"
           name="uploadmedia[identification]"
           accept="image/jpeg,image/gif,image/png,image/x-eps">
    @if(!empty($identity_file))
        <div class="text-center">
            <img src="{{getPublicFile($identity_file)}}"
                 class="img-client"><br>
        </div>
    @endif
</div>
<div class="col-md-6 ">
    <label class="lbl-file">Please upload document Proof of legal Identification
        number(s) or document proof current legally acquired Social Security Number
        (ie SSN CARD, first page of tax form, passport , green card, etc. )</label>
    @include('partials.file_size_label')
    <input id="ssn_proof_file" type="file" class="form-control"
           name="uploadmedia[ssn]"
           onchange="return common_helper.fileSizeValidation(this,{{$max_file_size}})"
           accept="image/jpeg,image/gif,image/png,image/x-eps">
    @if(!empty($ssn_file))
    <div class="text-center">
        <img src="{{getPublicFile($ssn_file)}}"
             class="img-client"><br>
    </div>
    @endif
</div>
<div class="col-md-6 ">
    <label class="lbl-file">Please upload document proof of address's street number,
        street name, City and State/Province/Etc. (such as a current Utility Bill or
        First page of a Banking statement</label>
    @include('partials.file_size_label')
    <input id="address_proof_file" type="file" class="form-control"
           name="uploadmedia[state_photo_id]"
           onchange="return common_helper.fileSizeValidation(this,{{$max_file_size}})"
           accept="image/jpeg,image/gif,image/png,image/x-eps">
    @if(!empty($state_file))
    <div class="text-center">
        <img src="{{getPublicFile($state_file)}}"
             class="img-client"><br>
    </div>
    @endif
</div>
<div class="col-md-6 ">
    <label class="lbl-file">Other Document Upload</label>
    @include('partials.file_size_label')
    <input id="other_file" type="file" class="form-control"
           name="uploadmedia[mail_doc]"
           onchange="return common_helper.fileSizeValidation(this,{{$max_file_size}})"
           accept="image/jpeg,image/gif,image/png,image/x-eps">
    @if(!empty($other_doc_file))
    <div class="text-center">
        <img src="{{getPublicFile($other_doc_file)}}"
             class="img-client"><br>
    </div>
    @endif
</div>

