<div class="row session">
@foreach ($data as $values)


   <div class="col-sm-12">
        <div class="title-category">
            <div class="pull-left">
                <h2>{{$values['category_name']}}</h2>
            </div>
            <div class="pull-right">
                <div class="button-more">
                    <a href="{{ route('item-category.list',Crypt::encrypt($values['category_id'])) }}">View More</a>
                </div>
            </div>
        </div>
    </div>


    <?php $item =  $values['items']; ?>
    @foreach ($item as $value)
    <div class="col-sm-6 col-xs-6 col-lg-4">
        <div class="article">
            <a href="{{route('item.detail', Crypt::encrypt($value->id)) }}">
                <div class="thum">
                     @php
                        $img = explode('||', $value->item_img);
                    @endphp
                   <img src="{{ asset('assets/images/resize/525x300/'.$img[0]) }}" alt="">
                    <div class="price">
                        <p>$ {{ number_format($value->item_price, 2) }}</p>
                    </div>
                </div>
                <div class="description">
                    <!-- <small>House for rent</small> -->
                    <h3> <i class="fa fa-calendar" aria-hidden="true"></i> 
                        {{ str_limit( $value->item_title, $limit = 20, $end = '...') }}</h3>
                    <p>{{ date('Y-m-d', strtotime($value->item_posted))}}</p>
                    <div class="boder-bottom"></div>
                    <ul>
                        <li><i class="fa fa-building" aria-hidden="true"></i> {{ $value->item_sq_fp }} sqft</li>
                        <li><i class="fa fa-bed" aria-hidden="true"></i> {{ $value->item_bedroom }}</li>
                        <li><i class="fa fa-home" aria-hidden="true"></i> {{ $value->item_parking }}</li>
                        <li><i class="fa fa-bed" aria-hidden="true"></i> {{ $value->item_bathroom }}</li>
                    </ul>
                </div>
            </a>
        </div>
    </div>


    @endforeach
    
@endforeach
</div>

