Hey there! I'm currently working on retrieving data from my database using a foreach loop in Laravel. My goal is to display the information horizontally, with one group of data next to another. However, I've run into an issue where the data is being repeated vertically when I try to use cards or a slider, as shown in the images provided. Can anyone offer some guidance on how I can fetch and organize the data horizontally? Just looking for some ideas!
Here is what it looks like with the foreach loop:
I want the layout to look like this horizontally:
This is the code snippet I have implemented in the blade file:
@foreach
@elseif (count($data) > 2)
<div class="row">
<div class="col-sm-3">
@foreach ($data as $key => $jobs)
<div class="card">
<div class="card-body">
<h5 class="card-title">{{$jobs->tilte}}</h5>
<p class="card-text">{{$jobs->final_sub}}</p>
<a href="#" class="btn btn-primary">Apply</a>
</div>
</div>
@endforeach
</div>
</div>
@else