@php $forceEnabled = $forceEnabled ?? false; $commentsEnabled = false; if (isset($article) && $article->section) { // Seções especiais que sempre permitem comentários $specialSections = ['bastidores-da-politica', 'coluna-do-holanda']; $isSpecialSection = in_array($article->section->slug, $specialSections); $commentsEnabled = $forceEnabled || $isSpecialSection || $article->section->comments_enabled; } $comments = []; if ($commentsEnabled) { $comments = \App\Models\Comment::with(['approvedReplies', 'user']) ->where('article_id', $article->id) ->where('status', 'approved') ->whereNull('parent_id') ->orderBy('created_at', 'desc') ->get(); } @endphp @if($commentsEnabled)
Aviso