================================================================================ BEEB BEEB - NOTIFICATION TYPES ================================================================================ Total: 30 notification types Translation files: resources/lang/ar/notification.php resources/lang/en/notification.php Enum file: app/Enums/NotificationTypeEnum.php Service file: app/Services/Notification/NotificationService.php -------------------------------------------------------------------------------- CONTACT (2) -------------------------------------------------------------------------------- contact_notify → Admin receives new contact message contact_replied → Client receives reply to their contact message -------------------------------------------------------------------------------- ENTITY LIFECYCLE — Admin receives (4) -------------------------------------------------------------------------------- entity_created → New client or provider registered entity_approved → Entity account approved (sent to entity) entity_rejected → Entity account rejected (sent to entity) entity_needs_approval → Entity updated data and needs review -------------------------------------------------------------------------------- RIDER (11) — Channels: sms / push / in_app -------------------------------------------------------------------------------- otp_requested → OTP verification code [sms] ride_started → Scooter unlocked [push, in_app] ride_ended → Ride finished + cost [push, in_app] low_balance → Wallet below threshold [push] balance_depleted_mid_ride → Balance cannot cover ride [push, in_app] package_expiry_reminder → Subscription expires in 3 days [push] package_expired → Subscription expired today [push] topup_success → Wallet charged successfully [push] payment_failed → Card payment declined [push, in_app] ticket_reply → Support ticket reply received [push, in_app] complain_status_changed → Complaint status updated [push, in_app] -------------------------------------------------------------------------------- RIDER — Future / Ready (3) -------------------------------------------------------------------------------- promo_offer → New promo code offer [push] refund_approved → Refund credited to wallet [push, in_app] refund_rejected → Refund request rejected [push, in_app] -------------------------------------------------------------------------------- PROVIDER / INVESTOR (6) — Channels: push / in_app -------------------------------------------------------------------------------- investor_verification_result → KYC / account review result [push, in_app] settlement_accepted → Settlement request approved [push, in_app] settlement_rejected → Settlement request rejected [push, in_app] settlement_transferred → Settlement amount disbursed [push, in_app] settlement_invoice_ready → Settlement invoice available [push, in_app] settlement_objection_resolved → Objection resolved [push, in_app] -------------------------------------------------------------------------------- STAFF / ADMIN (7) -------------------------------------------------------------------------------- complain_created → New complaint submitted [in_app via GlobalNotification] settlement_request → New settlement request [in_app via GlobalNotification] ride_over_duration → Ride running over 1 hour [dashboard_alert] ticket_sla_breach → Ticket exceeded SLA limit [dashboard_alert] geofence_violation → Scooter exited geofence [dashboard_alert] fleet_all_maintenance → All scooters in maintenance [dashboard_alert] vehicle_banned → Scooter banned [dashboard_alert] -------------------------------------------------------------------------------- BROADCAST (1) -------------------------------------------------------------------------------- campaign_broadcast → Campaign dispatched to users [push] ================================================================================ TEMPLATE PARAMETERS BY TYPE ================================================================================ otp_requested → :otp_code ride_ended → :cost low_balance → :balance balance_depleted_mid_ride → (no params) package_expiry_reminder → :package_name package_expired → :package_name topup_success → :amount, :balance payment_failed → (no params) ticket_reply → :ticket_id complain_status_changed → :complain_number, :status promo_offer → :promo_code, :discount refund_approved → :amount refund_rejected → :transaction_id investor_verification_result → :status, :notes settlement_accepted → :settlement_id, :amount settlement_rejected → :settlement_id, :reason settlement_transferred → :amount, :month settlement_invoice_ready → :month settlement_objection_resolved → :month, :status complain_created → :name, :complain_number, :title settlement_request → :provider_name, :settlement_id, :amount, :rides_count ride_over_duration → :ride_id, :client_name ticket_sla_breach → :ticket_id geofence_violation → :scooter_code fleet_all_maintenance → :provider_name vehicle_banned → :scooter_code campaign_broadcast → :campaign_title entity_created → :name, :id entity_approved → :id entity_rejected → :id, :reason entity_needs_approval → :id contact_notify → :name contact_replied → :reply ================================================================================ HOW TO DISPATCH A NOTIFICATION ================================================================================ use App\Enums\NotificationTypeEnum; use App\Services\Notification\NotificationEvent; use App\Services\Notification\NotificationService; (new NotificationService())->notify( new NotificationEvent( NotificationTypeEnum::RIDE_ENDED, // type $client->id, // recipient ID 'rider', // role: rider | investor | staff ['cost' => 12.50] // template params ) ); Roles: 'rider' → resolves App\Models\Client 'investor' → resolves App\Models\Provider 'staff' → resolves App\Models\Admin (or broadcasts to all admins if ID <= 0) ================================================================================