@extends('layouts.public') @section('title', 'All Blogs') @section('content')

All Blogs

@if(!empty($search))

Showing results for "{{ $search }}" — {{ $blogs->total() }} found.

@endif
@forelse($blogs as $blog)
@if($blog->category){{ $blog->category->name }}@endif

{{ $blog->title }}

{{ \Illuminate\Support\Str::limit($blog->excerpt ?? strip_tags($blog->content), 130) }}

{{ $blog->author->name }} {{ $blog->published_at?->format('M d, Y') }}
@empty
No blogs found{{ !empty($search) ? ' for that query' : '' }}.
@endforelse
{{ $blogs->links() }}
Categories
@endsection