@extends('layouts.landing') @section('title') {{$group->name}} @endsection @section('content')
{{$feed->created_at->diffForHumans()}}
{!! preg_replace("~[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]~", "\\0", $feed->content) !!}
@php $photos = json_decode($feed->photo_path); if($photos) { $photo_count = count($photos); } @endphp @if($photos) @if(count($photos) > 0 && count($photos) < 2) @elseif(count($photos) > 1 && count($photos) < 3) @elseif(count($photos) > 2 && count($photos) < 4) @elseif(count($photos) > 3 && count($photos) < 5) @elseif(count($photos) > 4) @php $n = 4; // to get the 4th image if the image count is greater than 3 @endphp@php $like_count = App\Models\Like::where('feed_id', $feed->id)->where('like', 1)->count(); @endphp @if($like_count > 0 && $like_count < 2) {{$like_count}} like @elseif($like_count > 1) {{$like_count}} likes @else {{$like_count}} like @endif
@php $comment_count = App\Models\Comment::where('feed_id', $feed->id)->count(); @endphp {{$comment_count}} @if($comment_count <= 1) comment @elseif($comment_count > 1) comments @endif
Share
Comment
{{\Carbon\Carbon::parse($mentor_meeting->meeting_date)->toFormattedDateString()}}
{{$mentor_meeting->meeting_start_time}} - {{$mentor_meeting->meeting_end_time}}
@if($mentor_meeting->meeting_date < now())Ended
@else{{$mentor_meeting->meeting_link}}
Scheduled
@endif @if(Auth::user()->id == $mentor->user_id) @if($mentor_meeting->meeting_date >= now()) @php $date = \Carbon\Carbon::parse($mentor_meeting->meeting_date)->toFormattedDateString(); $time = $mentor_meeting->meeting_start_time . ' - ' . $mentor_meeting->meeting_end_time; @endphp @elseif($mentor_meeting->meeting_date < now()) @endif @endifMentor . {{$review_count}}
{{$mentee_review_count}} {{getRating($mentee_rating->user_rating)}}
@endif
{{$user->first_name}} {{$user->last_name}}
{{$comment->created_at->diffForHumans()}}{{$comment->comment_body}}
@php $comment_like_count = App\Models\CommentLike::where('comment_id', $comment->id)->where('feed_id', $feed->id)->where('like', 1)->count(); @endphp @if($comment_like_count > 0 && $comment_like_count < 2) {{$comment_like_count}} like @elseif($comment_like_count > 1) {{$comment_like_count}} likes @else {{$comment_like_count}} like @endif . @php $comment_reply_count = App\Models\CommentReply::where('comment_id', $comment->id)->where('feed_id', $feed->id)->count(); @endphp @if($comment_reply_count <= 1) reply @elseif($comment_reply_count > 1) replies @endif @php $comment_replies = App\Models\CommentReply::where('comment_id', $comment->id)->orderBy('created_at', 'ASC')->get(); $all_replies = App\Models\CommentReply::where('comment_id', $comment->id)->count(); @endphp{{$user->first_name}} {{$user->last_name}}
{{$comment_reply->created_at->diffForHumans()}}{{$comment_reply->comment_reply_body}}
@php $comment_reply_like_count = App\Models\CommentReplyLike::where('comment_reply_id', $comment_reply->id)->where('comment_id', $comment->id)->where('like', 1)->count(); @endphp @if($comment_reply_like_count > 0 && $comment_reply_like_count < 2) {{$comment_reply_like_count}} like @elseif($comment_reply_like_count > 1) {{$comment_reply_like_count}} likes @else {{$comment_reply_like_count}} like @endif