@extends('backend.layouts.master') @section('title') {{ __('sidebar.post_title_name') }} @endsection @section('main-content') @include('backend.layouts.notification')
Article
@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_tag') }} {{ __('sidebar.post_author') }} {{ __('sidebar.post_photo') }} {{ __('sidebar.post_status') }} {{ __('sidebar.post_action') }}
{{$post->id}} {{$post->title}} {{$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 news found!!! Please create news
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush