@foreach($posts as $date => $postsForDate)

@if($date >= Carbon::now()) {{ Date::diffInDaysString($postsForDate[0]->date) }} @else {{ Date::diffInDaysString($postsForDate[0]->date) }} @endif {{ count($postsForDate) }}

@foreach($postsForDate as $post) @php if(isset($post->state)) { $platforms = $post->platforms; $date = $post->date; $post = $post->post; $post->date = $date; $post->platforms = $platforms; } @endphp @endforeach
@if(Access::hasAnyEditPermission($post->type, $post->user_id)) @endif
@if(count($post->tag('abteilung'))) {{ $post->tag('abteilung')[0]->name }} @endif : {{ ucfirst($post->type) }}
@php $platforms = explode(",", $post->platforms); @endphp @foreach($platforms as $platform) @if($platform == 'facebook') @elseif($platform == 'twitter') @elseif($platform == 'stadtanzeiger') @endif @endforeach
{{ Post::getSocialMediaTitle($post) }}

@if(isset($post->previewDocument->filename)) @endif {!! Post::getSocialMediaDescription($post) !!}

@endforeach