Proje: Okul Platform · Hub: Okul Platform — Architecture
SchoolOffer Akış Mimarisi
Temel Alan Semantiği
| Alan | Açıklama | Örnek değer |
|---|---|---|
ref | Hangi form/akış olduğunu belirtir | profiling-multiple, lead-pool |
referer | ref ile aynı değeri alır (semantik kopya); bazı akışlarda HTTP Referer URL’i | profiling-multiple, lead-pool |
type | Offer tipi — set edilmezse normal offer | scholarship, lgs, pending-scholarship |
approved_type | type’a göre service tarafında set edilir | null (normal), scholarship, lgs |
source_action | Hangi cihaz/akıştan geldiği — API tarafında kullanılır | offer-desktop, offer-mobile, whatsapp-form-desktop |
source_action
- API reposunda
2026_04_02tarihli migration ile eklendi (school_offers+leadstablolarına). - Okul reposunda
SchoolOffer::$fillable’a 2026-04-27 tarihinde eklendi. SourceActionTypeenum değerleri (API reposunda):offer-desktop/offer-mobileokulcomtr_scholarship-desktop/okulcomtr_scholarship-mobilewhatsapp-form-desktop/whatsapp-form-mobile
- Device tespiti:
Jenssegers\AgentileisMobile()kontrolü.
referer Set Etme Paterni
Her akışın kendi referer değeri var:
submitOfferForm(okul profil sayfası): HTML form hidden field’danrequest('referer')LeadPoolFormService: hardcoded'lead-pool'ProfilingController::submitMultipleOffers: hardcoded'profiling-multiple'
Offer Akışları
1. Okul Profil Sayfası (standard)
- Controller:
Ajax/SchoolProfileController::submitOfferForm - 24h kontrolü:
User::userOffersByTimeSchoolIds()ile request()->all()direkt service’e gider
2. Lead Pool Formu
- Service:
LeadPoolFormService referer = 'lead-pool',typeform’dan gelir,approved_type = typesource_actionset edilmez
3. Profiling Multi-Offer
- Controller:
Front/ProfilingController::submitMultipleOffers - Route:
POST /egitim-yaklasimi-testi/cok-okula-basvur ref = 'profiling-multiple',referer = 'profiling-multiple'source_action:Jenssegers\Agentile device detection →offer-desktop/offer-mobile- 24h kontrolü: listing’de
whereNotIn+ submit’tehasRecentOffer()
PHP → JS User Data Köprüsü (Profiling)
Giriş yapmış kullanıcının form prefill akışı:
ProfilingController::getLoggedInUserData()→$data['profilingUser']- Blade:
window.profilingUserData = @json($profilingUser)(page_varssection’ında) - Alpine component
init()→_prefillUser()→ form.name/email/phone dolar, terms işaretlenir
Related
- 2026-04-27-school-offer-business-rules — iş kuralları (24h, approved_type, duplicate)
- 2026-04-15-profiling-event-taxonomy — profiling GA event ağacı
- Okul Platform — Architecture