Skip to content

Instantly share code, notes, and snippets.

@raymond1988
Created March 28, 2018 11:36
Show Gist options
  • Save raymond1988/e090ae9c16d5e2d22bab22e3f0d66cad to your computer and use it in GitHub Desktop.
Save raymond1988/e090ae9c16d5e2d22bab22e3f0d66cad to your computer and use it in GitHub Desktop.
@extends('layouts.app')
@section('title', 'Welcome, here is a list of posts')
@section('content')
<div class="col-sm-12">
<ul>
@if($collection)
@foreach ($collection->chunk(3) as $items)
<div class="row row-seperator">
@foreach($items as $post)
<div class="col-sm-4 dv-shadow">
<div class="card card-custom">
<img class="img-fluid img-custom" src="{{ asset('/images/user_name/default.jpg') }}" alt="">
<li><h4 class="post-title"><a href='{{route('post.show', $post->id)}}'>{{$post->title}}</a></h4></li>
<p class="post-description">{{$post->description}}</p>
</div>
</div>
@endforeach
</div>
@endforeach
@else
<li>Nothing to show</li>
@endif
</ul>
</div>
@endsection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment