@extends('dashboard.layouts.main') @section('title', getSiteName() . ' - Dashboard - News') @section('content')

{{ __('News') }}

@can('add articles') {{ __('Add New Article') }} @endcan
Filters
@if($news->isNotEmpty()) @can('add articles') @endcan @foreach($news as $article) @can('add articles') @endcan @endforeach
{{ __('Thumb') }} {{ __('Title') }} {{ __('View') }} {{ __('Category') }} {{ __('Date Publish') }} {{ __('Status') }}
@if(!$article->preview_type) @if($article->image && exitstFile('storage/app/public/uploads/news/' . $article->id . '/', $article->image)) Image @else Image @endif @else Image @endif {{ $article->getInfo()->title }} {{ __('Open') }} @foreach($article->newsCategories as $category)
{{ $category->getInfo()->title }}@if (!$loop->last), @endif

@endforeach
@if($article->date_publish)
{{ Carbon\Carbon::parse($article->date_publish)->format('d.m.Y') }}
{{ Carbon\Carbon::parse($article->date_publish)->format('H:i') }} @endif
{{ $article->views }} {{ $article->status ? __('Active') : __('Inactive') }}
@if($news->hasPages()) {{ $news->onEachSide(1, 2)->links('dashboard.partials.pagination') }} @endif
Showing {{ $news->count() }} of {{ $news->total() }} articles
@else

{{ __('News not found.') }}

@endif
@endsection @section('footer-scripts') @endsection