@extends('frontend.layout.appLayout') @section('content')

{{$blog->title}}

By Manoj Kaliyannan | {{ \Carbon\Carbon::parse($blog->created_at)->format('d F Y') }} | {{$blog->reding_time}} min read

{{$blog->title}}
{{$blog->title}}
@php $content = preg_replace_callback( '/(.*?)<\/h[1-3]>/', function ($matches) { $level = $matches[1]; $title = $matches[2]; $id = Str::slug(strip_tags($title)); return "$title"; }, $blog->content ); echo $content; @endphp

Table of Contents

    @php $content = $blog->content; preg_match_all('/(.*?)<\/h[1-3]>/', $content, $matches, PREG_SET_ORDER); foreach ($matches as $match) { $level = $match[1]; $title = strip_tags($match[2]); $slug = Str::slug($title); echo "
  • $title
  • "; } @endphp
@endsection