{{ __('sidebar.post_list') }}

{{--
--}}
@if(count($posts)>0) @foreach($posts as $post) @php $author_info=DB::table('users')->select('name')->where('id',$post->added_by)->get(); // dd($sub_cat_info); // dd($author_info); $cat_info=DB::table('post_categories')->select('title')->where('id',$post->post_cat_id)->get(); @endphp @endforeach
{{ __('sidebar.post_snumber') }} {{ __('sidebar.post_title') }} {{ __('sidebar.post_category') }} {{ __('sidebar.post_tag') }} {{ __('sidebar.post_author') }} {{ __('sidebar.post_photo') }} {{ __('sidebar.post_status') }} {{ __('sidebar.post_action') }}
{{$post->id}} {{$post->title}} @foreach($cat_info as $data) {{$post->cat_info->title}} @endforeach {{$post->tags}} @foreach($author_info as $data) {{$data->name}} @endforeach @if($post->photo) {{ Storage::url($post->photo) }} @else avatar.png @endif @if($post->status=='active') {{$post->status}} @else {{$post->status}} @endif
@csrf @method('delete')
{{$posts->links()}} @else
No posts found!!! Please create Post
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush