@extends('frontend.layouts.app') @section('content')

{{ $book_details->book_name }}

By. {{ $book_details->author_name }}

{{ $book_details->short_description }}

NUMBER OF CHAPTERS: {{ count($book_details->ChapterVideo) }}

{{--

AUTHOR: {{ $book_details->author_name }}

--}} {{--

PUBLISHED: 2013

PUBLISHER: A G testroni co. ltd. --}}

PRICE:{{ $book_details->bookPrice[0]->currency->symbol . '' . $book_details->bookPrice[0]->book_price }}

@csrf @method('patch')

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)
@foreach ($chapter as $chapter_video)
@endforeach
@php $count++ @endphp @endforeach
Related Books

@endsection