@extends('templates.main') @section('content') <div class="blog"> <div class="photoTop4"> <h1>MY BLOG</h1> </div> <div class="allBlogPosts"> <?php $posts = \App\Models\Post::simplePaginate(5); $posts->setPath(""); ?> @foreach($posts as $post) <div id="blog-card" class="blog-card"> <div class="photo photo1" style="background: url({{asset('img/'.$post->photos[0]->image)}}) center no-repeat;background-size: cover; background-repeat:no-repeat;"> </div> <ul class="details"> <li class="date">{{$post->created_at}}</li> <li class="tags"> <ul> @foreach($post->labels as $label) <li>{{$label->label}}</li> @endforeach </ul> </li> </ul> <div class="description"> <h1>{{$post->title}}</h1> <p class="summary">{{$post->content}}</p> <a href="{{url('posts/'.$post->id)}}">Read More</a>