@extends('frontend.layouts.master') @section('title', $blog->meta_title ?? $blog->title) @section('meta_description', $blog->meta_description ?? $blog->short_description) @section('content') {{ __('ui.home') }} {{ __('ui.blog') }} @if($blog->category) {{ $blog->category->name }} @endif {{ $blog->title }} {{ $blog->category->name ?? __('front.common.uncategorized') }} {{ optional($blog->published_at ?? $blog->created_at)->format('d M Y') }} {{ $blog->views }} {{ __('front.blog_detail.views') }} {{ $blog->title }} {!! $blog->content !!} {{ __('front.blog_detail.share') }} Facebook Twitter LinkedIn {{ __('front.blog_detail.latest_articles') }} @php $recentBlogs = \App\Models\Blog::published()->where('id', '!=', $blog->id)->orderByDesc('published_at')->take(5)->get(); @endphp @foreach($recentBlogs as $recent) {{ $recent->title }} {{ optional($recent->published_at ?? $recent->created_at)->format('d M Y') }} @endforeach @if(count($categories) > 0) {{ __('front.blog_detail.categories') }} @foreach($categories as $cat) {{ $cat->name }} @endforeach @endif @if(count($relatedBlogs) > 0) {{ __('front.blog_detail.related_articles') }} @foreach($relatedBlogs as $related) {{ $related->category->name ?? __('front.common.uncategorized') }} {{ $related->title }} {{ optional($related->published_at ?? $related->created_at)->format('d M Y') }} {{ $related->views }} @endforeach @endif @endsection