My Books
Chapters
@php
$chapters = $book_details->ChapterVideo->groupBy('chapter_number');
// dd($book_details->ChapterVideo->groupBy('chapter_number'));
function slugify($string)
{
return strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', $string), '-'));
}
$count = 0;
@endphp
@foreach ($chapters as $key => $chapter)
@php $count++ @endphp
@endforeach
@foreach ($chapter as $chapter_video)
@endforeach
@endforeach