{{-- resources/views/quiz/result.blade.php --}} @extends('layouts.app') @section('title', ' Reading Quiz Result | Bargain Book Hut') @push('styles') @endpush @section('content') {{-- Reader-identity hero: only renders if the controller actually had a type name + details to hand over (Session::get('quiz_type_name') / 'quiz_type_details'). Falls back to a plain page if that data is missing for any reason (e.g. an older session), so this never breaks the page — it just quietly omits the hero. --}} @if(!empty($typeName) && !empty($typeDetails))
Your result

{{ $typeName }}

{{ $typeDetails['description'] ?? '' }}

@if(!empty($typeDetails['superpowers']))
@foreach($typeDetails['superpowers'] as $i => $superpower)
{{ $i + 1 }}
{{ $superpower }}
@endforeach
@endif
@endif

@if(!empty($typeName)) Books for a {{ $typeName }} @else For your personality @endif

Your top 5 books picked for the way you read.

@if(!empty($picks))
Curated via {{ $source === 'builtin' ? 'our in-house picks' : $source }}
@endif @if(empty($picks))
We couldn't put together your picks this time. Retake the quiz to try again.
@else
@foreach($picks as $index => $pick) @php $productUrl = url(($pick['channel'] ?? 'retail') . '/Productdetails/' . $pick['id'] . '/' . ($pick['slug'] ?? '')); $imgUrl = !empty($pick['image']) ? asset($pick['image']) : asset('images/book-placeholder.png'); @endphp
{{ $index + 1 }}
{{ $pick['title'] }}
{{ $pick['title'] }}
{{ $pick['author'] }}
{{ $pick['reason'] }}
@if(!empty($pick['priceNow']))
{{ $pick['priceNow'] }} @if(!empty($pick['priceWas'])) {{ $pick['priceWas'] }} @endif
@endif
@endforeach
Retake the quiz @endif
@push('scripts') @endpush @endsection