@extends('layout.master') @section('title') {{ $post->title }} - @endsection @section('content')

{{ $post->title }}

Published at: {{ $post->create_at }}, Author: {{ $post->author }} @if(isset($_SESSION['is_auth']) && $post->author == $_SESSION['username']) Edit Delete @endif
@markdown($post->content)
@if(count($tags))
@foreach($tags as $key => $tag) {{ $tag->keyword }} @if($key < count($tags) - 1),@endif @endforeach
@endif @endsection @section('comments')
@if(isset($comment_errors)) @endif @if(isset($_SESSION['is_auth']))
@endif @if(count($comments))

{{ $post->num_of_comments }} {{ $post->num_of_comments > 1 ? 'comments' : 'comment' }}:

@foreach($comments as $comment)
{{ $comment->author }}
{{ $comment->create_at }} @if(isset($_SESSION['is_auth'])) @if($comment->author == $_SESSION['username']) Edit @endif @if($post->author == $_SESSION['username']) Delete @endif @endif

{!! nl2br(e($comment->content)) !!}

@endforeach @endif
@endsection