dimanche 27 mai 2018

using Localized Carbon with diffForHumans duplicate number of days

in my page i show posts and i use diffForHumans to display how mush time pass when post created and i translate it usin Localized Carbon in arabic language . it's working but in days he display number of days two times . for exemple instead of showing 5 days ago. he display 5 5 days ago

<div class="row" >
    <!-- properties -->
    @foreach($orderOffers as $key => $offer)
        <div class="col-lg-4 col-sm-6">
            <div class="properties">
                
                <div class="image-holder"><span><i class="fas fa-hourglass-start"></i></span>
                    <img src=""  class="img-responsive dimensions" alt="properties">
                    <div class="status sold">
                        @if($offer->negotiable)
                            <i class="far fa-thumbs-up"></i>  قابل للتفاوض
                        @else
                            <i class="far fa-thumbs-down"></i> غير قابل للتفاوض
                        @endif
                    </div>
                </div>
                <h4><a href="property-detail.php"></a></h4>
                <p class="price"><i class="fas fa-hand-holding-usd"></i></p>
                <p class="price"> <i class="fas fa-map-marker"></i></p>
                <?php
                $id = $hashids->encodeHex($offer->id);
                ?>
                <a class="btn btn-primary" href="">عرض المزيد</a>
            </div>
        </div>
    @endforeach
</div>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire