@php use Carbon\Carbon;@endphp
<div class="row text-center justify-content-center mb-5">
    <div class="col-xl-6 col-lg-8">
        <h4 class="font-weight-bold hbg-dark">Citizen's Documents.</h4>
    </div>
</div>
<div class="row">

    @if(!empty($humanAllDocs))
        @foreach($humanAllDocs as $humanAllDoc)
            <div class="col-3">
                <div class="card card-outline card-primary">
                    <div class="card-body">
                        <div class="row">
                            <div class="col-6" style="margin: auto;">
                                <div class="row" style="background-color: #f0f0f0;padding: 10px 3px 2px 10px;">
                                    <h4>
                                        @if (isset($humanAllDoc['json_array(doc_rekv)']))
                                            @if($humanAllDoc['type'] == 'IDC')
                                                ID card
                                            @endif
                                            @if($humanAllDoc['type'] == 'DOI')
                                                Passport
                                            @endif
                                        @endif
                                    </h4>
                                </div>
                            </div>
                            <div class="col-6">
                                @if (isset($humanAllDoc['json_array(doc_rekv)']))
                                    @if($humanAllDoc['type'] == 'IDC')
                                        <span>ID No.</span>
                                        <h5 class="doctitlebold">{{ $humanAllDoc['json_array(doc_rekv)'][0]['O_PID'] }}</h5>
                                        <span>Serial No.</span>
                                        <h5 class="doctitlebold">{{ $humanAllDoc['ser_num'] }}</h5>
                                    @endif
                                    @if($humanAllDoc['type'] == 'DOI')
                                            <span>Passport No.</span>
                                            <h5 class="doctitlebold">{{ $humanAllDoc['json_array(doc_rekv)'][0]['PASSPORT_NO'] }}</h5>
                                            <span>Expires</span>
                                            <h5 class="doctitlebold">{{ Carbon::parse($humanAllDoc['json_array(doc_rekv)'][0]['EXPIRY_DATE'])->format("d-m-Y") }}</h5>
                                    @endif
                                @endif
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        @endforeach
    @endif
</div>
<style>
    .doctitlebold{
        font-weight: bold;
    }
</style>
