@extends('layouts.app') @section('title', 'Comunidad — Fermenty') @section('content')
Comunidad

Tips, preguntas y recetas de otros fermentadores

+ Nueva publicación
{{-- Filtros --}}
@foreach(['all' => 'Todo', 'tip' => '💡 Tips', 'question' => '❓ Preguntas', 'recipe' => '📋 Recetas', 'review' => '⭐ Valoraciones'] as $filter => $label) {{ $label }} @if(isset($counts[$filter])) ({{ $counts[$filter] }}) @endif @endforeach @if($ferments->count() > 0) @endif
@forelse($posts as $post)
@if($post->user->avatar_url) {{ $post->user->name }} @else {{ strtoupper(substr($post->user->name, 0, 1)) }} @endif
{{ $post->user->name }}
{{ $post->created_at->diffForHumans() }}
@if($post->guide) {{ $post->guide->name }} @endif {{ ['tip' => '💡 Tip', 'question' => '❓ Pregunta', 'recipe' => '📋 Receta', 'review' => '⭐ Valoración'][$post->post_type] }}

{{ $post->title }}

{{ Str::limit($post->content, 150) }}

{{-- Preview de foto si tiene --}} @if($post->image_1)
Foto @if($post->image_2) +{{ count(array_filter([$post->image_2, $post->image_3])) }} más @endif
@endif
@csrf
💬 {{ $post->comments_count }} @if(auth()->user()->isAdmin() || (auth()->id() === $post->user_id && $post->comments_count === 0))
@csrf @method('DELETE')
@endif
@empty
👥
Sin publicaciones todavía
¡Sé el primero en compartir algo!
Crear publicación
@endforelse @if($posts->hasPages())
{{ $posts->links() }}
@endif @endsection