@extends('layouts.adminlte') @section('bodyClass', 'hold-transition skin-blue sidebar-aside') @section('content')

Edit category

{{ csrf_field() }} {{ method_field('PUT') }}

List posts of category

@foreach($posts as $item) @if($item->getAuthor) @else @endif @if($item->getEditor) @else @endif @endforeach
ID Photo Title Author Editor Categories Tags Time
{{$item->id}} {{$item->title}}{{$item->getAuthor->name}}{{$item->getEditor->name}}{{$item->category?$item->category->category_name:''}} @if($item->tags) @foreach($item->tags as $tag) {{$tag->tag_name}} @endforeach @endif @if($item->publish_date) Published at: {{date_format(date_create($item->publish_date),setting('date_formats'))}}
@endif @if($item->created_at) Created at: {{$item->created_at->format(setting('date_formats'))}} @endif

{{ $posts->links()}}
@endsection @push('scripts') @endpush