@extends('frontend.layouts.template') @section('content')
{{ $blog->subject }}
@php $tags = @json_decode($blog->tags ); // $writers = ($blog->writer && strpos($blog->writer,']') === false) ? json_decode(jsonEncode([ ['text' => $blog->writer]])) : json_decode( $blog->writer ); $writers = objTags($blog->writer); $blog_date = $blog->event_date ? $blog->event_date : $blog->created_at; if( $blog->image_blogs && $blog->image_blogs->id ){ $blog_bg = $blog->image_blogs->path . $blog->image_blogs->filename; }else{ $blog_bg = $blog->category->bg->path . $blog->category->bg->filename; } @endphp
@if ($writers) @foreach ($writers as $writer) {{ $writer->text }} @endforeach @endif {{ date('d-m-Y',strtotime( $blog_date ) ) }}
@if( $tags) @foreach ($tags as $tag) {{ $tag->text }} @endforeach @endif

{!! $blog->detail !!}
@if ( $blog->attach_blogs && $blog->attach_blogs->id ) @endif
@php $cNo = 1; @endphp @if( $blog->comments ) @foreach ($blog->comments as $comment)
Comment No.{{ $cNo }}
{{ date('d-m-Y', strtotime( $comment->created_at ) ) }}
{!! nl2br($comment->message) !!}
Fullname : {{ $comment->user ? $comment->user->name ? $comment->user->name : $comment->user->firstname .' ' . $comment->user->lastname : '' }}
Occupation : {{ ( $comment->user && $comment->user->occupation )? $comment->user->occupation : '' }}
@if ( auth()->check() ) Reply @if ( $comment->user->id == auth()->user()->id || auth()->user()->level == 'admin') @endif @endif
@if( $comment->reply) @php $refNo = $cNo; @endphp @foreach ($comment->reply as $reply) @endforeach @endif @if (count($comment->reply) > 0)
SHOW REPLY
@endif
@php $cNo++; @endphp @endforeach @endif @if( auth()->check() )
{{ csrf_field() }}

COMMENT

@endif
@endsection @section('modals') @include('frontend.modals.documents') @endsection @section('stylesheet') @endsection @section('javascript') @endsection