@extends('layouts.landing') @section('title') {{$user->first_name}} {{$user->last_name}} @endsection @section('content')
{{$user->bio}}
{{$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
Share
{{$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
Share