@php
$getuserdata = DB::table('users')->where('id',$item->created_by)->first();
$profileimg = url('/').'/assets/images/usrbig.jpg';
if(is_array($getuserdata) && count($getuserdata)>0) {
if($getuserdata->profile_picture) {
$profileimg = url('/')."/uploads/members/".$getuserdata->profile_picture;
}
if($getuserdata->sm!='') {
$profileimg = $getuserdata->profile_picture;
}
}
@endphp
@if(Auth::check())
@if($item->created_by == Auth::user()->id)
Edit Post
Delete Post
@endif
Report Post
@endif
{{isset($getuserdata->name)?$getuserdata->name:''}} @if($item->feeling_name && $item->feeling_class) is {{$item->feeling_name}} @endif
published:
@if($item->updated_at)
{{ date("F, d Y h:i A",strtotime($item->updated_at))}}
@else
{{ date("F, d Y h:i A",strtotime($item->created_at))}}
@endif
{{$item->post_name}}
@php
$postimages = DB::table('post_images')->where('post_id',$item->id)->get();
@endphp
@if(count($postimages)==1 && $item->post_type=='image')
@foreach($postimages as $k=>$itm)
@if($itm->image_name)
@endif
@endforeach
@endif
@if(count($postimages)==2 && $item->post_type=='image')
@endif
@if(count($postimages)==3)
@endif
@if(count($postimages)>=4 && $item->post_type=='image')
@foreach($postimages as $k=>$itm)
3) style="display: none !important;" @endif>
@if(count($postimages)>4)
@if($k==3)
+{{count($postimages) - 4}}
@endif
@endif
@endforeach
@endif
@if(count($postimages) && $item->post_type=='video')
@foreach($postimages as $k=>$itm)
Your browser does not support the video tag.
@endforeach
@endif
@if(count($postimages) && $item->post_type=='audio')
@foreach($postimages as $k=>$itm)
Your browser does not support the video tag.
@endforeach
@endif
@php
$isLiked = 0;
if(Auth::check()) {
$isLiked=DB::table('voting')->where("postid",$item->id)->where("vtype",'post')->where("user_id",Auth::user()->id)->count();
}
@endphp
@if($isLiked==0)
favorite
favorite
@else
favorite
@endif
{{comp_numb($item->post_likes)}}
@php
$shareUrl = url('/');
@endphp
{{$item->share_count}}
@php
$postimages = DB::table('voting')->where('postid',$item->id)->where('vtype','post')->get();
$isloggeduserLiked = 0;
if(Auth::check()) {
$isloggeduserLiked = DB::table('voting')->where('postid',$item->id)->where('vtype','post')->where('user_id', Auth::user()->id)->count();
}
@endphp
@if(count($postimages)>0)
@php $i = 1; $likedusersname = ''; @endphp
@foreach($postimages as $k=>$itm)
@php
$getuserdetails = DB::table('users')->where('id',$itm->user_id)->first();
$profileimg = url('/').'/assets/images/usrbig.jpg';
if(is_array($getuserdetails) && count($getuserdetails)>0) {
if($getuserdetails->profile_picture) {
$profileimg = url('/')."/uploads/members/".$getuserdetails->profile_picture; }
if($getuserdetails->sm!='') {
$profileimg = $getuserdetails->profile_picture;
}
if($getuserdetails->name && $likedusersname=='') { $likedusersname = $likedusersname.$getuserdetails->name; }
}
@endphp
@php $i++; @endphp
@php if($i>7) { break; } @endphp
@endforeach
@if($isloggeduserLiked!=0) You and , @endif {{$likedusersname}} {{count($postimages)}}
@if(count($postimages)>7) + more @endif liked
@endif
@php
$postcomments = DB::table('post_comments')->where('post_id',$item->id)->limit('2')->get();
$cmd_lastid = 0;
@endphp
@if(count($postcomments)>0)
@foreach($postcomments as $c => $cmd_item)
@php
$getuserinfo = DB::table('users')->where('id',$cmd_item->created_by)->first();
$profileimg = url('/').'/assets/images/usrbig.jpg';
if(is_array($getuserinfo) && count($getuserinfo)>0) {
if($getuserinfo->profile_picture) {
$profileimg = url('/')."/uploads/members/".$getuserinfo->profile_picture;
}
if($getuserinfo->sm!='') {
$profileimg = $getuserinfo->profile_picture;
}
}
@endphp
@php
$cmd_lastid = $cmd_item->id;
@endphp
@endforeach
@if(count($postcomments)>1)
more comments+
@endif
@endif
@if(count($postcomments)==0) @endif
{{isset($getuserinfo->name)?$getuserinfo->name:''}}
{{$cmd_item->comments}}
@php $commentimages = DB::table('comments_images')->where('comment_id',$cmd_item->id)->get(); @endphp