@extends('layouts.theme') @if(isset($blogdetail)) @section('title',"$blogdetail->title") @endif @section('main-wrapper') @php $uname=App\User::where('id',$blogdetail->user_id)->get(); foreach($uname as $name) { $user_name = $name->name; } @endphp {{$blogdetail->title}} {{date ('d.m.Y',strtotime($blogdetail->created_at))}} {{$user_name}} {!! $blogdetail->detail !!} @if(Auth::check() && Auth::user() != NULL) @php $like=App\Like::orderBy('created_at','desc')->where('added','1')->where('blog_id',$blogdetail->id)->count(); $unlike=App\Like::orderBy('created_at','desc')->where('added','-1')->where('blog_id',$blogdetail->id)->count(); @endphp {{$like}} {{$unlike}} @endif @if(isset($exceptblog) && $exceptblog != NULL && count($exceptblog) > 0) {{__('staticwords.recentpost')}} @foreach($exceptblog as $eblog) {{$eblog->title}} {!! str_limit($eblog->detail, 150) !!} @endforeach @endif @if(Auth::check() && Auth::user() != NULL) {{__('staticwords.comment')}} {{__('staticwords.postcomment')}} {{$blogdetail->comments->count()}} {{__('staticwords.comment')}} @foreach ($blogdetail->comments as $comment) {{ucfirst($comment->name)}} {{date('F jS, Y - g:i a',strtotime($comment->created_at))}} @if(Auth::user()->is_admin == 1 || $comment->user_id == Auth::user()->id) @endif {{$comment->comment}} {{-- --}} × {{__('staticwords.areyousure')}} {{__('staticwords.modelmessage')}} × {{__('staticwords.replyfor')}} {{$comment->name}} {{ csrf_field() }} {{Form::label('reply','Your Reply:')}} {{Form::textarea('reply', null, ['class' => 'form-control', 'rows'=> '5','cols' => '10'])}} {{__('staticwords.submit')}} {{-- --}} @foreach($comment->subcomments as $subcomment) @php $name=App\User::where('id',$subcomment->user_id)->first(); @endphp {{ucfirst($name->name)}} {{date('F jS, Y - g:i a',strtotime($subcomment->created_at))}} @if(Auth::user()->is_admin == 1 || $subcomment->user_id == Auth::user()->id) @endif {{$subcomment->reply}} × {{__('staticwords.areyousure')}} {{__('staticwords.modelmessage')}} @endforeach @endforeach @auth {{__('staticwords.postcomment')}}: {{Form::open( ['route' => ['comment.store', $blogdetail->id], 'method' => 'POST'])}} {{Form::label('name', __('staticwords.name'))}} {{Form::text('name', null, ['class' => 'form-control',])}} {{Form::label('email', __('staticwords.email'))}} {{Form::email('email', null, ['class' => 'form-control'])}} {{Form::label('comment',__('staticwords.comment'))}} {{Form::textarea('comment', null, ['class' => 'form-control', 'rows'=> '5','cols' => '10'])}} {{Form::submit(__('staticwords.addcomment'), ['class' => 'btn btn-md btn-primary'])}} @endauth @endif @endsection
{!! $blogdetail->detail !!}
{{$eblog->title}}
{{date('F jS, Y - g:i a',strtotime($comment->created_at))}}
{{__('staticwords.modelmessage')}}
{{date('F jS, Y - g:i a',strtotime($subcomment->created_at))}}
{{ucfirst($comment->name)}}
{{date('F jS, Y - g:i a',strtotime($comment->created_at))}}