@extends('admin.layouts.master') @section('content')

{{ trans('app.blogs') }}

@can('create', \App\Models\Blog::class) {{ trans('app.add_blog') }} @endcan
@can('massDelete', \App\Models\Blog::class) @endcan @foreach ($blogs as $blog) @can('massDelete', \App\Models\Blog::class) @endcan @endforeach
{{ trans('app.image') }} {{ trans('app.blog_title') }} {{ trans('app.author') }} {{ trans('app.date') }}  
{!! $blog->title !!} @can('update', $blog) {!! $blog->title !!} @else {!! $blog->title !!} @endcan
{!! $blog->excerpt !!} @if (!$blog->status)
{{ strtoupper(trans('app.draft')) }} @endif
{{ $blog->author ? $blog->author->getName() : '' }} {{ $blog->comments_count }} @if ($blog->status) {{ trans('app.published_at') }}
{{ optional($blog->published_at)->toFormattedDateString() }} @else {{ trans('app.updated_at') }}
{{ $blog->updated_at->toFormattedDateString() }} @endif
@can('update', $blog)   @endcan @can('delete', $blog) {!! Form::open(['route' => ['admin.utility.blog.trash', $blog->id], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent', 'title' => trans('app.trash'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endcan

@can('massDelete', \App\Models\Blog::class) {!! Form::open(['route' => ['admin.utility.blog.emptyTrash'], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm btn btn-default btn-flat ajax-silent', 'title' => trans('help.empty_trash'), 'data-toggle' => 'tooltip', 'data-placement' => 'right']) !!} {!! Form::close() !!} @else @endcan {{ trans('app.trash') }}

@foreach ($trashes as $trash) @endforeach
{{ trans('app.blog_title') }} {{ trans('app.author') }} {{ trans('app.deleted_at') }} {{ trans('app.option') }}
{!! $trash->title !!} {!! $trash->excerpt !!} {{ $trash->author->getName() }} {{ $trash->deleted_at->diffForHumans() }} @can('delete', $trash)   {!! Form::open(['route' => ['admin.utility.blog.destroy', $trash->id], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent', 'title' => trans('app.delete_permanently'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endcan
@endsection