@extends('layouts.app') @section('title', $article->title) @section('content')

{{ $article->title }}

@if ($article->category){{ title_case_words($article->category) }} · @endif {{ title_case_words($article->audience) }} {{ title_case_words($article->status) }}

@csrf
Edit
@csrf @method('DELETE')
@include('components.kpi', ['label' => 'Views', 'value' => number_format($article->views), 'variant' => 'info']) @include('components.kpi', ['label' => 'Marked helpful', 'value' => number_format($article->helpful_count), 'variant' => 'good']) @include('components.kpi', ['label' => 'Updated', 'value' => $article->updated_at?->format('d M Y') ?: '—']) @include('components.kpi', ['label' => 'Slug', 'value' => \Illuminate\Support\Str::limit($article->slug, 14)])

Content

{{ $article->body }}
@if ($article->tags)
@foreach ($article->tags as $tag) {{ $tag }} @endforeach
@endif

Related articles

@if ($related->isEmpty()) @include('components.empty-state', [ 'icon' => '📚', 'title' => 'Nothing related yet', 'message' => $article->category ? 'No other published article is filed under "'.title_case_words($article->category).'".' : 'Give this article a category to link it to others.', ]) @else
    @foreach ($related as $r)
  • {{ $r->title }}
    {{ number_format($r->views) }} views
  • @endforeach
@endif
@endsection