Skip to main content

Events

Three custom events in app/Events/: Plus Laravel’s built-in Registered event (fired after user registration).

Event-listener wiring

File: app/Providers/EventServiceProvider.php
SendNewAccountCreatedEmail checks config('env') instead of config('app.env') — this is likely a bug that may cause it to silently fail. Confirm with team.

Email templates

16 Mailable classes in app/Mail/. All use Queueable and SerializesModels.

Lesson lifecycle emails

Account & profile emails

Review & notification emails

Integration emails

Payment emails

Verification emails

Email recipients pattern

Most emails follow this pattern:
  • Primary recipient: The relevant user (tutor, student, or parent)
  • BCC: Internal team addresses (MAIL_TO_INTERNAL_TEAM_ADDRESSES env var)
  • Some emails go directly to hello@tutorbloc.com (hardcoded)

Notifications

Two notification classes in app/Notifications/:

Push notifications

Push notifications are sent via the RemotePushNotifiable trait. The system supports:

Apple Push Notification Service (APNS)

Configured via env vars: APNS_KEY_FILE, APNS_KEY_ID, APNS_TEAM_ID, APNS_BUNDLE_ID Device tokens stored in user_devices table:
  • ios_device_token
  • ios_aps_environment (production/sandbox)
  • is_push_notification_enabled
File: app/Models/v1/UserDevice.php The UserDevice model handles token deduplication — removeDeviceTokenIfExists() prevents the same device token being registered to multiple users.

Firebase Cloud Messaging (FCM)

Env vars exist (FCM_API_ACCESS_KEY, FCM_URL) but no FCM service class was found in the codebase. May be incomplete or handled externally — confirm with team.

Push notification triggers

Broadcast channels

File: routes/channels.php A private broadcast channel is registered for user-specific events:
Broadcasting driver defaults to null (disabled). Can be switched to Pusher or Redis via BROADCAST_DRIVER env var. Pusher credentials are configured in config/broadcasting.php.