Comments + 1N relations

This commit is contained in:
Clément
2025-04-17 14:30:56 +02:00
parent ea0884d39f
commit dad50e035f
15 changed files with 380 additions and 29 deletions

View File

@@ -0,0 +1,24 @@
@extends('layout')
@section('contenu')
<article>
<header>
<h1 class="titreBillet">{{ $billet->BIL_TITRE }}</h1>
<time>{{ $billet->BIL_DATE }}</time>
</header>
<p>{{ $billet->BIL_CONTENU }}</p>
</article>
<hr />
@if (count($commentaires) > 0)
<header>
<h1 id="titreReponses">Réponses à {{ $billet->BIL_TITRE }}</h1>
</header>
@foreach($commentaires as $commentaire)
<p>{{ $commentaire->COM_AUTEUR }} dit :</p>
<p>{{ $commentaire->COM_CONTENU }}</p>
@endforeach
@else
<header>
<h1 id="titreReponses">Il n'y a pas de réponse à ce billet.</h1>
</header>
@endif
@endsection