@extends('layouts.app') @section('title', $book->title . ' by ' . $book->author . ' - Book Details') @section('content')
@php $allImages = $book->all_image_urls; @endphp @if(count($allImages) > 1)
{{ $book->title }}
@foreach($allImages as $index => $imageUrl) @endforeach
1 / {{ count($allImages) }}
@else
{{ $book->title }}
@endif

{{ $book->title }}

Book information

by {{ $book->author }}

@if($book->isbn)

ISBN: {{ $book->isbn }}

@endif
{{ $book->category->name }} @if($book->language !== 'English') {{ $book->language }} @endif

₹{{ number_format($book->price, 2) }}

@if($book->shipping_price > 0)

+ ₹{{ number_format($book->shipping_price, 2) }} shipping

@else

Free shipping

@endif
@if($book->stock === 'in_stock')
In Stock
@elseif($book->stock === 'limited_stock')
Limited Stock
@else
Out of Stock
@endif
@if($book->description)

Description

{{ $book->description }}

@endif

Book Details

Author: {{ $book->author }}
Category: {{ $book->category->name }}
Language: {{ $book->language }}
Added: {{ $book->created_at->ist()->format('F j, Y') }}
@if($book->height || $book->width || $book->depth || $book->weight)

Physical Properties

@if($book->height)
Height: {{ $book->height }} cm
@endif @if($book->width)
Width: {{ $book->width }} cm
@endif @if($book->depth)
Depth: {{ $book->depth }} cm
@endif @if($book->weight)
Weight: {{ $book->weight }} kg
@endif
@endif
@auth @if($book->is_available)
@csrf
@else @endif @if(!Auth::user()->hasInWishlist($book))
@csrf
@else @endif @else @endauth
@if($relatedBooks->count() > 0)

More books in {{ $book->category->name }}

@foreach($relatedBooks as $relatedBook)
{{ $relatedBook->title }}

{{ $relatedBook->title }}

by {{ $relatedBook->author }}

₹{{ number_format($relatedBook->price, 2) }} View Details →
@endforeach
@endif
@endsection