@extends('layouts.app') @section('title', $product->name . ' - Sweet Delights Bakery') @section('description', \Illuminate\Support\Str::limit($product->description ?? 'Delicious ' . $product->name . ' from Sweet Delights Bakery. Freshly baked with love.', 160)) @section('content')
@if($product->images->count() > 0)
{{ $product->name }}
@if($product->images->count() > 1)
@foreach($product->images as $image) {{ $product->name }} @endforeach
@endif @else
No Image Available
@endif

{{ $product->name }}

@if($product->is_on_sale)
R{{ number_format($product->sale_price, 2) }} R{{ number_format($product->price, 2) }} ON SALE
@else

R{{ number_format($product->price, 2) }}

@endif

{{ $product->description }}

@if($product->specs)

Specifications

    @foreach($product->specs as $key => $value)
  • {{ $key }}: {{ $value }}
  • @endforeach
@endif

Category: {{ $product->category->name }}

Availability: {{ $product->availability ? 'In Stock' : 'Out of Stock' }}

@if($product->availability)
@else @endif
@if($relatedProducts->count() > 0)

Related Products

@foreach($relatedProducts as $relatedProduct) @endforeach
@endif
@endsection @push('modals')
@csrf
@endpush @push('modals') @endpush @push('scripts') @endpush