@extends('page.layouts.main') @push('styles') @endpush @section('content') {{-- Back to blog --}} ← Back to Blog @php $title = $blog->translate[$locale]['title'] ?? $blog->slug; $desc = $blog->translate[$locale]['description'] ?? null; $content = $blog->translate[$locale]['content'] ?? null; $img = asset('media/blog/' . $blog->image); // Tags $tags = $blog->tags ?? []; // Blog Category $category = $blog->blogCategory; $categoryName = null; if ($category && is_array($category->translate)) { $categoryName = $category->translate[$locale]['name'] ?? $category->translate['en']['name'] ?? $category->translate[array_key_first($category->translate)]['name'] ?? null; } @endphp {{-- Title --}} {{ $title }} {{-- Category --}} @if ($categoryName) {{ $categoryName }} @endif {{-- Description --}} @if($desc) {{ $desc }} @endif {{-- Blog Image --}} {{-- Tags --}} @if(!empty($tags) && count($tags) > 0) @foreach($tags as $tag) @php $tagName = $tag->translate[$locale]['name'] ?? $tag->translate['en']['name'] ?? $tag->translate[array_key_first($tag->translate)]['name'] ?? null; @endphp @if($tagName) {{ $tagName }} @endif @endforeach @endif {{-- Content --}} {!! $content !!} {{-- Disqus Comment Section --}} Please enable JavaScript to view the comments powered by Disqus. @endsection
{{ $desc }}