Apr 29, 2019
0
Level 1
Blog Post Card Float
Hello, I have written PHP Code to display blog posts and they do, however, I would like them to display in floating style on row, like how it is on Laracasts. Please advise me on how to do so.
Here is my code below:
Blade View Code:
<div class="row">
<div class="col-md">
<div class="card">
<?=$post->image_tag("medium", true, ''); ?>
<div class="card-body">
<h5 class="card-title"><b>{{$post->title}}</b></h5>
<p class="card-text"><b>{!! $post->generate_introduction(400) !!}</b></p>
</div>
</div>
</div>
</div>
Here is the controller code:
$posts = $posts->orderBy("posted_at", "desc")
->paginate(config("blog.per_page", 10));
return view("blog::index", [
'posts' => $posts,
'title' => $title,
]);
Please or to participate in this conversation.