Controller:
case 'article':
$datas = DB::table('articles')->OrderBy('id','desc')->get();
foreach ($datas as $data)
{ array_push($arr,$data->id); }
$count=count($arr);
$page=$count/6;
// dd($page);
return view('front.viewall',compact('datas','cat','count','page'));
<div class="carousel-inner picturesliderimage">
<?php $tmp=0;?>
@for($i=0;$i<$page;$i++)
@if($i==0)
<div class="item active">
@else
<div class="item">
@endif <div class="row" style="margin-top:50px">
@for($j=0;$j==0||0!=$j%6&&$tmp<$count;$j++,$tmp++)
<div class="col-lg-4 col-md-4 col-sm-12 col-xl-12 picturesliderhover" style="text-align:center; margin-bottom: 5%;">
{{--@foreach($datas as $data)--}}
<img class="responsive" src="https://html5box.com/html5lightbox/images/lakeandballoon.jpg" alt="">
<div class="textinsideimageslider">
<p class="subheading1">{{$datas[$tmp]->category}}</p>
<p class="subheading2">{{$datas[$tmp]->title}}</p>
<p class="subheading3">{{$datas[$tmp]->auther}}</p>
</div>
{{--@endforeach--}}
</div> @endfor </div> </div> @endfor </div></div>
For normal carasole
controller:
foreach ($innovations as $s) {// array_push($sarr,$s->id); $idi=$s->id; $countinnovation++; }
View:
@for($i=0;$i<$countinnovation;$i++) @if($i==0)<div class="item active"> @else <div class="item"> @endif
<span style="font-size: 9px; letter-spacing: 1px; font-family:montserrat">Project Stag:</span>  <span id="green">{{$innovations[$i]->project_stag}}</span><br><span id="slider-title">{{$innovations[$i]->title}}</span><br>
@endfor
Comments
Post a Comment