@extends('layouts.landing') @section('title') {{$search}} @endsection @section('content')
Posted {{$feed->created_at->diffForHumans()}}
{{$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}} likes @endif
{{--10 Shares
--}}@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
@php $follows = App\Models\Follower::where('followed_user_id', Auth::user()->id)->where('user_id', $user->id)->where('follow_status', 1)->first(); @endphp @if($follows) Follows you . {{$user->state}}, {{$user->country}} @else {{$user->state}}, {{$user->country}} @endif
Posted {{$feed->created_at->diffForHumans()}}
{{$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}} likes @endif
{{--10 Shares
--}}@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
{{$comment->comment_body}}
2 Likes . @php $reply_count = App\Models\CommentReply::where('comment_id', $comment->id)->where('feed_id', $feed->id)->count(); @endphp @if($reply_count <= 1) reply @elseif($reply_count > 1) replies @endif Reply @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{{$reply->comment_reply_body}}
2 LikesPosted {{$feed->created_at->diffForHumans()}}
{{$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}} likes @endif
{{--10 Shares
--}}@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
{{$comment->comment_body}}
2 Likes . @php $reply_count = App\Models\CommentReply::where('comment_id', $comment->id)->where('feed_id', $feed->id)->count(); @endphp @if($reply_count <= 1) reply @elseif($reply_count > 1) replies @endif Reply @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{{$reply->comment_reply_body}}
2 Likes
{{$user->first_name}} {{$user->last_name}}
{{$comment->created_at->diffForHumans()}}{{$comment->comment_body}}
2 Likes . @php $reply_count = App\Models\CommentReply::where('comment_id', $comment->id)->where('feed_id', $feed->id)->count(); @endphp @if($reply_count <= 1) reply @elseif($reply_count > 1) replies @endif Reply @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}}
{{$reply->created_at->diffForHumans()}}{{$reply->comment_reply_body}}
2 Likes