@extends('general_base') @section('title', 'Blogs') @section('style') @endsection @section('content')

Latest Stories

Discover our latest articles and updates

@if($blogs->isEmpty())

No Stories Yet

Check back soon for new articles

@else @foreach($blogs as $blog)
{{ $blog->created_at->format('M d, Y') }}
@php $totalReactions = collect(App\Models\BlogReaction::REACTIONS) ->map(function($reaction, $type) use ($blog) { return $blog->reactions()->where('reaction_type', $type)->count(); })->sum(); @endphp
👍 {{ $totalReactions }}
{{ $blog->comments->count() }}

{{ $blog->title }}

@if($blog->tags)
@foreach(array_slice($blog->tags, 0, 3) as $tag) #{{ $tag }} @endforeach @if(count($blog->tags) > 3) +{{ count($blog->tags) - 3 }} @endif
@endif
@endforeach @if($blogs->hasPages())
{{ $blogs->links('partial.pagination') }}
@endif @endif
@endsection