@extends('layouts.main') @section('container')

{{ $title }}

@if (request('category')) @endif @if (request('author')) @endif
@if ($posts->count())
{{ $posts[0]->category->name }}

{{ $posts[0]->title }}

By {{ $posts[0]->author->name }} in {{ $posts[0]->category->name }} at {{ date('F d, Y', strtotime($posts[0]->created_at)) }}

{{ $posts[0]->excerpt }}

Read more
@foreach ($posts->skip(1) as $post)
{{ $post->category->name }}
{{ $post->title }}

By {{ $post->author->name }} at {{ date('F d, Y', strtotime($post->created_at)) }}

{{ $post->excerpt }}

Read More
@endforeach
@else

No Post Found

@endif
{{ $posts->links() }}
@endsection