-
Mahmoud Aglan authored
- Install kreait/firebase-php SDK - Create PushNotificationService with 3-tier credential resolution (system_settings → storage file → env var, graceful degradation) - Auto-deactivate invalid/unregistered FCM tokens on send failure - Add Push case to NotificationChannel enum - Create 6 event listeners for push notifications: - AttendanceMarked → notify guardians (present/absent) - PaymentReceived → confirm payment to guardians - InvoiceCreated → alert guardians of new invoice - SessionCancelled → notify all group participants - EnrollmentCreated → confirm enrollment to guardians - EvaluationShared → notify guardians of new evaluation - Register all listeners in EventServiceProvider (queued) - Create NotificationController API endpoints: - GET notifications (paginated + unread count) - PATCH notifications/{id}/read - POST notifications/read-all - GET/POST notifications/preferences - Create scheduled push commands: - push:session-reminder (every minute, 30min before session) - push:installment-due (daily, 1 and 3 days before due) - Add channel_push column to notification_preferences - Total: 20 API endpoints now live Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
0b2c6122
Analyzing file…