{{-- --}}
{{ __('Dashboard') }} {{ __('Posts') }} {{ __('New Post') }}
Reset
@foreach ($posts as $post) @php //dd($post); @endphp @endforeach
{{ __('ID') }} {{ __('Title') }} {{ __('Category') }} {{ __('Author') }} {{ __('Published At') }} {{ __('Status') }} {{ __('Actions') }}
{{ $post->id }} {{ $post->title }} {{ $post->category->name }} {{ $post->user->name }} {{ $post->is_published == '1' ? Carbon\Carbon::parse($post->published_at)->format('Y-m-d') : '---' }} {{ $post->is_published == '1' ? __('Online') : __('Offline') }}
{{ __('Edit') }} @if (auth()->user()->role == 'user' && $post->is_published != '1')
@csrf @method('DELETE')
@else
@csrf @method('DELETE')
@endif
{{ $posts->links() }}