@if ($newsfeed)

Welcome to your newsfeed

We don't mind muddy paws, but leave any unclean content at the door, please! Keep everyone's tails wagging by posting respectfully and within the MorePaws guidelines.

Create new post

@else @php if ($user->id == auth()->id()) { $posts = $user->posts->sortByDesc('created_at')->paginate($perPage); } else { $hideUserPosts = $user->hiddenPosts()->pluck('post_id'); $posts = $user->posts->whereNotIn('id', $hideUserPosts)->sortByDesc('created_at')->paginate($perPage); } @endphp @endif @foreach ($posts as $post)
@if (auth()->id() != $post->user_id) @endif @if (auth()->id() == $post->user_id) @endif @if (auth()->id() == $post->user_id || Auth::user()->hasRole('admin')) @endif

{{ $post->user->fullName() }}

@if ($post->location) # {{ $post->location }} @endif {{ $post->created_at->diffForHumans() }}

{{ $post->description }}

@isset($post->image)
post_photo_newsfeed") }}" width="756" height="323" alt="#">
@endisset
@if ($post->comments()->count() > 3)

View all comments

@endif @php $comments = $post->comments()->orderBy('created_at', 'desc')->take(3)->get()->sortBy('created_at'); @endphp
@if ($comments->isNotEmpty()) @foreach($comments as $comment) @livewire('newsfeed.comments.comment', ['comment' => $comment], key(rand() . '_' . $comment->id . '_' . $comment->updated_at)) @endforeach @else

No comments yet

@endif
@include('livewire.newsfeed.comments.comment_form')
@endforeach
@push('modals') @livewire('newsfeed.posts.modals.show-post', ['post_id' => null]) @endpush @push('scripts') {{-- --}} @endpush