@extends('layouts.user') @php use Illuminate\Support\Str; use Carbon\Carbon; // 1. Clean Meta Description $cleanDesc = !empty($blog->meta_description) ? $blog->meta_description : Str::limit(strip_tags($blog->description), 155); // 2. SEO Title & URLs $metaTitle = !empty($blog->meta_title) ? $blog->meta_title : $blog->title; $canonicalUrl = !empty($blog->canonical_url) ? $blog->canonical_url : url('/blogs/' . $blog->slug); $imageUrl = !empty($blog->image) ? asset($blog->image) : asset('images/Logo-1.webp'); // 3. Safe ISO Dates $createdDate = $blog->created_at ? Carbon::parse($blog->created_at)->toIso8601String() : now()->toIso8601String(); $updatedDate = $blog->updated_at ? Carbon::parse($blog->updated_at)->toIso8601String() : $createdDate; // 4. Safe JSON-LD Schema Array $schemaData = [ "@context" => "https://schema.org", "@type" => "BlogPosting", "mainEntityOfPage" => [ "@type" => "WebPage", "@id" => $canonicalUrl ], "headline" => $blog->title, "description" => $cleanDesc, "image" => $imageUrl, "author" => [ "@type" => "Organization", "name" => "La Classe Translation Pvt. Ltd.", "url" => url('/') ], "publisher" => [ "@type" => "Organization", "name" => "La Classe Translation Pvt. Ltd.", "logo" => [ "@type" => "ImageObject", "url" => asset('images/Logo-1.webp') ] ], "datePublished" => $createdDate, "dateModified" => $updatedDate ]; @endphp @section('title', $metaTitle . ' | La Classe Translation') @section('description', $cleanDesc) @section('keywords', !empty($blog->meta_keywords) ? $blog->meta_keywords : 'translation company, translation services, certified translation') @section('canonical', $canonicalUrl) @section('og_image', $imageUrl) @section('schema') {!! json_encode($schemaData, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT) !!} @endsection @section('content')
{{-- Breadcrumb --}} {{-- Title --}}

{{ $blog->title }}

{{-- Published Date --}}

{{ $blog->created_at ? \Carbon\Carbon::parse($blog->created_at)->format('d M Y') : '' }}

{{-- Featured Image --}} @if($blog->image)
{{ $blog->title }}
@endif {{-- Blog Body --}}
{!! $blog->description !!}

Back to All Blogs
@endsection