@extends('layouts.master') @section('content')
{{ $article->status }}
{{ $article->created_at->format('d M Y') }}

{{ $article->title }}

{{ $article->author }}

Author

@if($article->thumbnail)
Thumbnail
@endif

{{ $article->description }}

@if($article->subheadings->count())
@foreach($article->subheadings as $subheading)

{{ $subheading->title }}

@foreach($subheading->paragraphs as $paragraph)

{{ $paragraph->content }}

@endforeach
@endforeach
@endif

Komentar ({{ $article->comments->count() }})

@auth
@csrf
@error('content')
{{ $message }}
@enderror
@else
Silakan login untuk memberikan komentar.
@endauth
@forelse($article->comments()->with('user')->latest()->get() as $comment)
{{ $comment->user->name }}
{{ $comment->created_at->diffForHumans() }}

{{ $comment->content }}

@auth @if(auth()->id() === $comment->user_id)
@csrf @method('DELETE')
@endif @endauth
@empty

Belum ada komentar. Jadilah yang pertama berkomentar!

@endforelse
@push('scripts') @endpush @endsection