{{-- resources/views/frontend/pages/home/blog_details.blade.php --}} @extends('frontend.layouts.app') @section('title', $blog->name . ' - ' . config('app.name')) @section('meta_tags') @endsection @section('content')

{{ $blog->name }}

{{ $blog->created_at->format('F d, Y') }} By {{ $blog->author ?? 'Admin' }} @if($blog->category) {{ $blog->category }} @endif {{ $blog->created_at->diffForHumans() }}
@if($blog->image) @endif
{!! $blog->description !!}
@if($blog->tags)
Tags: @foreach(explode(',', $blog->tags) as $tag) {{ trim($tag) }} @endforeach
@endif
@if($blog->author_bio)
@if($blog->users->image) {{ $blog->image }} @else
@endif
About {{ $blog->author ?? 'The Author' }}

{!! $blog->author_bio !!}

@if($blog->author_twitter) @endif @if($blog->author_linkedin) @endif
@endif @php $previousPost = App\Models\Yojana::where('status', 'active') ->where('id', '<', $blog->id) ->orderBy('id', 'desc') ->first(); $nextPost = App\Models\Yojana::where('status', 'active') ->where('id', '>', $blog->id) ->orderBy('id', 'asc') ->first(); @endphp @if($previousPost || $nextPost) @endif @if(isset($relatedPosts) && $relatedPosts->count() > 0) @endif @if($blog->status !== 0)

Comments ({{ $comments->total() ?? 0 }})

@forelse($comments as $comment)
{{ $comment->users->name ?? 'User' }}
{{ $comment->users->name ?? 'Anonymous' }}
{{ $comment->created_at->diffForHumans() }}
@auth @if(Auth::user()->id == $comment->user_id || Auth::user()->user_type == 'admin')
@csrf @method('DELETE')
@endif @endauth

{{ $comment->comment }}

@empty

No comments yet. Be the first to comment!

@endforelse
@if(method_exists($comments, 'links') && $comments->hasPages())
{{ $comments->links() }}
@endif

Leave a Comment

@guest
To post a comment, you need to login first
@else
@csrf
@error('comment')
{{ $message }}
@enderror
@endguest
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush