@extends('public.layout') @section('title', $post->title.' — '.\App\Models\Setting::get('site.brand','Noesantara Law Firm')) @push('meta') @if($post->hero_image) @endif @endpush @push('meta') @php $articleSchema = [ '@context' => 'https://schema.org', '@type' => 'Article', 'headline' => $post->title, 'datePublished' => optional($post->published_at)->toIso8601String(), 'dateModified' => optional($post->updated_at)->toIso8601String(), 'image' => $post->hero_image ?: \App\Models\Setting::get('home.hero_image_url',''), 'author' => [ '@type' => 'Organization', 'name' => \App\Models\Setting::get('site.brand','Noesantara Law Firm') ], 'publisher' => [ '@type' => 'Organization', 'name' => \App\Models\Setting::get('site.brand','Noesantara Law Firm'), 'logo' => [ '@type' => 'ImageObject', 'url' => \App\Models\Setting::get('site.logo_url','') ] ], 'mainEntityOfPage' => [ '@type' => 'WebPage', '@id' => request()->fullUrl() ], 'description' => $post->excerpt, ]; $breadcrumbs = [ '@context' => 'https://schema.org', '@type' => 'BreadcrumbList', 'itemListElement' => [ [ '@type' => 'ListItem', 'position' => 1, 'name' => 'Home', 'item' => url('/') ], [ '@type' => 'ListItem', 'position' => 2, 'name' => 'Insights', 'item' => url('/insights') ], [ '@type' => 'ListItem', 'position' => 3, 'name' => $post->title, 'item' => request()->fullUrl() ], ], ]; @endphp @endpush @section('content')

{{ $post->title }}

{{ optional($post->published_at)->format('M d, Y') }}
@if($post->hero_image) {{ $post->title }} @endif
@php $allowed_tags = [ 'p' => ['class'], 'br' => [], 'strong' => [], 'em' => [], 'u' => [], 's' => [], 'ul' => ['class'], 'ol' => ['class'], 'li' => ['class'], 'h2' => ['class'], 'h3' => ['class'], 'h4' => ['class'], 'blockquote' => ['class'], 'hr' => [], 'a' => ['href','title','target','rel','class'], 'code' => ['class'], 'pre' => ['class'], 'img' => ['src','alt','title','class','width','height'], // in case body contains images ]; $clean = \Illuminate\Support\Str::of($post->body ?? '')->toString(); if (function_exists('clean')) { $html = clean($clean, ['HTML.Allowed' => implode(',', array_map(function($tag,$attrs){ return $tag.($attrs? '['.implode('|',$attrs).']' : ''); }, array_keys($allowed_tags), $allowed_tags))]); } else { $html = \App\Support\HtmlSanitizer::clean($clean, $allowed_tags); } @endphp {!! $html !!}
@endsection