Fix model images not showing on the brand's model-select page

BrandController::modelsForBrand() (used by /fahrzeuge/{brand}) never
selected image_path from car_models, so an image set on a model never
reached the public page regardless of the frontend rendering added
earlier - the API response simply didn't include it. index()'s equivalent
query for /brands already had the column; this one was missed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Maaxxs 2026-09-10 03:20:09 +02:00
parent a3767b1c0f
commit b690f7ef33

View file

@ -126,7 +126,7 @@ class BrandController
} }
$stmt = $db->prepare( $stmt = $db->prepare(
'SELECT id, name, slug, sort_order FROM car_models WHERE brand_id = ? ORDER BY sort_order, name' 'SELECT id, name, slug, image_path, sort_order FROM car_models WHERE brand_id = ? ORDER BY sort_order, name'
); );
$stmt->execute([$brand['id']]); $stmt->execute([$brand['id']]);