Proje: Okul API
Okul API — Conventions
Notlar
- api-code-conventions — StringEnumType, Revisionable, final readonly, Carbon macro
- api-controller-service-pattern — Controller→Service→Repository, Policy, Spatie
- api-response-structure — JsonResponse::success, Resource, StringBool
- api-observer-pattern — RevisionObserver, LeadObserver (deprecated)
- api-special-patterns — HasDelimiterSeparatedRelations, NotProvided type
- api-testing-conventions — PHPUnit 11, Spectator, TestCase yardımcı metodlar
- api-identify-customer-middleware — x-cid, CustomerActingUserResolver, product_has_*
- api-middleware-list — VerifyConsumerToken, UserGroupType, OptionalAuth
- api-app-bootstrap — Route grupları, rate limit, exception handler
- api-localization — TR/EN, route bazlı validation mesajları
- api-repository-pattern — BaseRepository, QueryCondition, BackedEnum
- api-cache-decorator-pattern — ConfigRepository cache, 24 saat TTL
- api-phone-number-helpers — isPhoneNumber, isPhoneGSM, getPhoneNaked*
- api-global-helpers — limitedPerPage (max 50), customer(), maskString()
- api-phpunit-config — MySQL (sqlite değil), sync queue, SMS=null
- api-code-quality-tools — Pint PSR-12, PHPStan level 5, ForbiddenDebug
- api-permission-migration-pattern — PermissionAddOrDropTrait standartı
- api-exception-handling — Exception kategorileri, HTTP status, Responsable
- api-custom-validation-rules — validatePhone, validateGsm, validateValidPhone
- api-business-validation-rules — CanNotMoreThanOneListingProduct, AgeRangeFormat
- api-form-request-patterns — prepareForValidation, makeUniquePhone, conditional
- api-policy-system — 41 policy, SUPER_ADMIN bypass, HasCustomer trait
- api-swagger-documentation — L5 Swagger, SWR response tipleri
- api-db-transaction-pattern — DB::transaction, exception handling
- api-resource-structure — Admin/School/Relations + User/Role/Permission
- api-dto-pattern — readonly DTO, Orderable trait, NotProvided type
- api-revisionable-presenters — labels (Türkçe), passThrough (ilişki adı)