@extends('layouts.app') @section('cssExternal') @endsection @section('title', 'Forum | GrowUp') @include('forum.editThreadModal') @include('forum.editReplyModal') @section('content')

{{ $title }}


{{-- BUAT PERTANYAAN --}}

Buat Pertanyaan

@csrf
Judul
@if ($errors->threadPost->any())
    @foreach ($errors->threadPost->all() as $error)
    {{ $error }}
    @endforeach
@endif
{{-- THREAD FORUM --}}
@if ($threads->count() != 0)

Thread

@foreach ($threads as $thread)

{{ $thread->title }}

{{ $thread->content }}

{{ $thread->user->name }}

@if ($thread->user_id == Auth::user()->id) Edit Delete @endif
@php $replies = $thread->answer @endphp @if ($replies->count() != 0) @foreach ($replies as $reply)

{{ $reply->content }}

{{ $reply->user->name }}

@if ($reply->user_id == Auth::user()->id) Edit Delete @endif
@endforeach @endif
@csrf
@if ($errors->threadReply->any() && $thread->id == session()->get('questionNo'))
    @foreach ($errors->threadReply->all() as $error)
    {{ $error }}
    @endforeach
@endif
@endforeach @endif
@endsection @section('jsExternal') @endsection