{{-- Review form. Submitted through Turbo (data-turbo="true", Drive stays off elsewhere): ProductController::storeReview() answers with Turbo Streams. On a validation error it replaces this form (#product-review-form) with a copy rendered with `messages` and the entered `values`, and `focus` so focus-on-connect moves focus to the first invalid field. Never reads the session (no old() or $errors), so the product page stays cacheable. --}} @props([ 'productId', 'messages' => null, // Illuminate\Support\MessageBag of validation errors 'values' => [], 'focus' => false, ]) @php $rating = (int) ($values['rating'] ?? 0); $error = fn (string $field) => $messages?->first($field); @endphp