@extends('frontend.layouts.template') @section('content') @php $tags = @json_decode($blog->tags ); $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 = 'frontend/assetsnew/img/whatworks/w2.jpg'; } @endphp
{{ $blog->subject }}
{{-- {{ $blog->writer }} --}} @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->name }}
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('stylesheet') @endsection @section('javascript') @endsection @section('modals') @include('frontend.modals.documents') @endsection