@extends('admin.users.user') @section('content')

Posts

@foreach ($user->allPosts as $post) @endforeach
Created By Post Post Content Audience Likes Comments View
{{ucfirst($post->user->username)}} {{ucfirst($post->type). ' '. str_replace('_', ' ', ucfirst($post->post_type))}} {{ $post->parent_id != 0 ? (strlen($post->shared_content) > 30 ? substr($post->shared_content, 0, 30) . '...' : $post->shared_content ?? 'No Content') : (strlen($post->content) > 30 ? substr($post->content, 0, 30) . '...' : $post->content ?? 'No Content') }} {{ucfirst(str_replace('_', ' ', $post->audience))}} {{count($post->likes)}} {{count($post->comments)}}
@endsection