Skip to content

Instantly share code, notes, and snippets.

@waqasraza123
Created May 15, 2017 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save waqasraza123/ac910cc661256ec1ae2c940850d18ef7 to your computer and use it in GitHub Desktop.
Save waqasraza123/ac910cc661256ec1ae2c940850d18ef7 to your computer and use it in GitHub Desktop.
<div class="row clearfix">
<h4 class="text-center">
@if($radius != 0 && $resultsCount == 0)
Zero Results Within {{$radius}} Km
@elseif((!empty($marketLocation) && $marketLocationMatchedCount == 0))
Not Available in {{$marketLocation}}
@elseif(!empty($marketLocation) && $marketLocationMatchedCount > 0)
Available in {{$marketLocation}}
@endif
</h4>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 margin-top-20">
<div>
<div class="body">
@forelse($mobiles->chunk(4) as $m)
<div class="row">
@foreach($m as $mobile)
<div class="col-sm-6 col-md-3 product mobile">
<div class="white-block product-box">
<div class="white-block-border">
<a href="{{route('show-mobile', ['brand' => $mobile['mobile']->brand->name, 'id' => $mobile['mobile']->id])}}">
<div class="thumbnail image_outer">
<img width="120px" height="90px" src="{{$placeholderImage}}" data-src="{{$mobile['mobile']->image}}">
</div>
</a>
<div class="caption product-data">
<p class="text-left">{{$mobile['mobile']->brand->name}}</p>
<b class="margin-0">{{$mobile['mobile']->title}}</b><br>
<span class="margin-0 black"><i class="fa fa-money"></i> {{$mobile['price'] == 999999999999 ? 'Not Available' : 'Rs - ' . $mobile['price']}}</span><br>
<p class="black"><i class="fa fa-location-arrow"></i> {!!$mobile['distance'] == 999999999999 ? "Unavailable Local" : " Approx " . $mobile['distance'] . " Km Away"!!}</p>
<p>
<button data-shop-lat="{{$mobile['mobile']->shop_lat}}" data-shop-long="{{$mobile['mobile']->shop_long}}" data-toggle="tooltip" data-placement="top" title="{{$mobile['location']}}" class="btn bg-green btn-xs waves-effect shop_map_modal "{{($mobile['available'] == null || $mobile['available'] == 'online') ? "disabled" : ""}}>Local</button>
<button data-toggle="tooltip" data-placement="top" title="Available on Online Vendors" class="btn bg-red btn-xs waves-effect "{{($mobile['available'] == null || $mobile['available'] == 'local') ? "disabled" : ""}}>Online</button>
</p>
</div>
</div>
</div>
</div>
@endforeach
</div>
@empty
<div class="callout callout-danger">
<h4>
Ooops!
</h4>
<p>
No Results Found for the Query.
</p>
</div>
@endforelse
@if($mobiles instanceof \Illuminate\Pagination\LengthAwarePaginator)
<div class="pagination-wrapper">
{!!
$mobiles->setPath('/search')
!!}
</div>
@endif
</div>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment