@extends('frontend.layouts.app') @section('meta') @php $metaData = getMeta('forum'); @endphp @endsection @section('content')

{{ __($forumPost->title) }}

@if(@$forumPost->user->role == 1)
{{ $forumPost->user->name }}

Admin

@elseif(@$forumPost->user->role == 2)
{{ $forumPost->user->instructor->name }}

Instructor

@elseif(@$forumPost->user->role == 3)
{{ $forumPost->user->student->name }}

Student

@else
Unknown
@endif
  • {{ countUserReplies($forumPost->user_id) }}
  • {{ $forumPost->total_seen }}
  • {{ $forumPost->forumPostComments->count() }}

{!! $forumPost->description !!}

  • {{@$forumPost->created_at->format(' j M, Y') }}
@if(@Auth::user()) @endif
{{ __('Replies') }} ({{ $forumPost->forumPostComments->count() }})
@foreach($forumPostComments ?? [] as $forumPostComment)
@if(@$forumPostComment->user->role == 1)
{{ $forumPostComment->user->name }}

{{ __('Admin') }}

@elseif(@$forumPostComment->user->role == 2)
{{ $forumPostComment->user->instructor->name }}

{{ __('Instructor') }}

@elseif(@$forumPostComment->user->role == 3)
{{ $forumPostComment->user->student->name }}

{{ __('Student') }}

@else
{{ __('Unknown') }}
@endif
  • {{ countUserReplies($forumPostComment->user_id) }}
  • {{ $forumPostComment->forumPostCommentReplies->count() }}

{!! $forumPostComment->comment !!}

  • {{ @$forumPostComment->created_at->format(' j M, Y') }}
@if(@Auth::user())
  • @if(@Auth::user()->role == 1)
    {{Auth::user()->name }}
    @elseif(@Auth::user()->role == 2)
    {{Auth::user()->instructor->name }}
    @elseif(@Auth::user()->role == 3)
    {{Auth::user()->student->name }}
    @endif
@endif
@foreach($forumPostComment->forumPostCommentReplies as $forumPostCommentReply)
@if(@$forumPostCommentReply->user->role == 1)
{{ $forumPostCommentReply->user->name }}

{{ __('Admin') }}

@elseif(@$forumPostCommentReply->user->role == 2)
{{ $forumPostCommentReply->user->instructor->name }}

{{ __('Instructor') }}

@elseif(@$forumPostCommentReply->user->role == 3)
{{ $forumPostCommentReply->user->student->name }}

{{ __('Student') }}

@else
{{ __('Unknown') }}
@endif
  • {{ countUserReplies($forumPostCommentReply->user_id) }}

{!! $forumPostCommentReply->comment !!}

  • {{ @$forumPostCommentReply->created_at->format(' j M, Y') }}
  • @if(@Auth::user()) @endif
@endforeach
@endforeach
@if(@Auth::user())
{{ __('Reply') }}
@csrf
@endif
@if(count($forumPostComments) >= 1) @endif
@if(count($suggestedForumPosts) >= 1)

{{ __('Suggested Topics') }}

@foreach($suggestedForumPosts as $suggestedForumPost)

{{ @$suggestedForumPost->forumCategory->title }}

{{ $suggestedForumPost->title }}

{!! strip_tags(Str::words($suggestedForumPost->description, 60)) !!}

  • {{ countUserReplies($suggestedForumPost->user_id) }}
  • {{ $suggestedForumPost->total_seen }}
  • {{ $suggestedForumPost->forumPostComments->count() }}
@endforeach
@endif
@if(count($blogs) >= 1)

{{ __('Community Blog Articles') }}

@foreach($blogs as $blog)
img
{{ @$blog->category->name }}

{{ Str::limit($blog->title, 50) }}

{{ $blog->user->name }} / {{ @$blog->created_at->format(' j M, Y') }}

{!! Str::limit($blog->details, 200) !!}

@endforeach
@endif
@endsection @push('style') @endpush @push('script') @endpush