# Children Photos From Folder

**Date:** 2026-07-22  
**Developer:** Jeetendra Maharjan  
**Status:** In Progress

---

## Summary
Update the `/children` page to display real names and photos from `public/fe/images/childrens`, replacing anonymized Child# codes and avatar illustrations.

---

## Changes Made

### 1 — ChildrenService from photo folder
- **File(s) affected:** `app/Services/Children/ChildrenService.php`
- **What was done:** Added service that scans `public/fe/images/childrens` and builds name + photo list from filenames
- **Why:** Drive the children page from real photos instead of hardcoded anonymized codes

### 2 — ChildrenController passes photo list
- **File(s) affected:** `app/Http/Controllers/Frontend/Children/ChildrenController.php`
- **What was done:** Injected ChildrenService and passed `$children` / `$childrenCount` to the view
- **Why:** Keep controller thin per service pattern

### 3 — Children page uses real names and photos
- **File(s) affected:** `resources/views/frontend/children.blade.php`
- **What was done:** Replaced Child# codes and avatar SVGs with a loop over folder photos; removed privacy/code notice; updated hero count to match photo count
- **Why:** User requested names and photos from `fe/images/childrens`, not anonymized codes

### 4 — Portrait image containers
- **File(s) affected:** `public/fe/assets/css/style.css`
- **What was done:** Changed `.child-card__img-wrap` from fixed `210px` height to `aspect-ratio: 3 / 4`
- **Why:** Photo cards should be portrait (taller than wide)

### 6 — Modal layout tweak
- **File(s) affected:** `resources/views/frontend/children.blade.php`
- **What was done:** Removed footer Close button; moved Special Need and Hobbies to full-width row below photo/details
- **Why:** User requested clearer modal layout

---

## Decisions & Notes
- Names are derived from image filenames (strip extension and trailing “our”, title-case remaining words).
- Protected children count on this page now matches the photo folder count (61).
- Child photo frames use a 3:4 portrait aspect ratio.
- Profile fields are dummy/generated for now; stories vary by seed from each filename.

---

## Pending / Follow-up
- [ ] Replace dummy profile/story data with real CMS or database content later
