<?php $c = 0; ?>
@foreach($products as $product)
<?php $b = ( ++$c % 2 == 0 ) ? true : false; ?>
@if($b)
<div class="row ">
@endif
<div class="col-xs-12 col-sm-6 service_2i">
<figure><img src="{{ url('/uploads') . '/' . $product->photo }}" alt="services" /></figure>
<div class="service-two_content">
<h6>{{ $product->name }}</h6>
<p>{{ $product->content }}
</p>
<a href="{{url('/contact')}}" class="btn trans-btn service-btn ">إتصل بنا</a>
</div>
</div>
@if($b)
</div>
@endif
@endforeach
Created
February 15, 2017 06:38
-
-
Save m5lil/97f5199bea1c2d0731b61727456bcf14 to your computer and use it in GitHub Desktop.
loop two item in one row
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
another solution :)