@if(session('success'))
{{ session('success') }}
@endif
@if(session('error'))
{{ session('error') }}
@endif
| {{ __('ID') }} |
{{ __('Post Type') }} |
{{ __('Text Preview') }} |
{{ __('User') }} |
{{ __('Created') }} |
{{ __('Actions') }} |
@forelse($posts as $post)
| {{ $post->id }} |
{{ ucfirst(str_replace('_', ' ', $post->post_type ?? 'post')) }}
|
@if($post->post_text)
{{ Str::limit(strip_tags($post->post_text), 20) }}
@else
{{ __('No text') }}
@endif
|
@if($post->user)
{{ $post->user->name ?? $post->user->username ?? 'Unknown' }}
@else
{{ __('Unknown') }}
@endif
|
{{ $post->created_at->format('M d, Y H:i') }} |
|
@empty
| {{ __('No posts found') }} |
@endforelse
{{ $posts->links('pagination::bootstrap-5') }}