These broadcasting channels allow real-time updates. The frontend can subscribe to them using Pusher.js, or another WebSocket library.
- Trip Creation Notification
- Channel Name: trip.created.{id}
- Authorization: A user can only listen to this channel if their ID matches {id}.
- Purpose: This channel notifies a specific user when a trip is created for them.
- Channel Name: trip.created.{id}
- Trip Departure Notification
- Channel Name: trip.departure.{tripId}
- Authorization: A user can only listen to this channel if they are associated with the trip.
- Purpose: This channel notifies passengers of when the vehicle leaves.
- Channel Name: trip.departure.{tripId}
- Trip Starting
- Channel Name: trip.start.{tripId})
- Authorization: A user can only listen to this channel if they are associated with the trip.
- Purpose: Notifies users when a trip is about to start.
- Channel Name: trip.start.{tripId})
- Funding Wallet
- Channel Name: wallet.funded.{userId}
- Authorization: The user whose wallet was credited.
- Purpose: Notifies the user when their wallet is funded.
- Channel Name: wallet.funded.{userId}
- Booking Trip
- Channel Name: trip.booking.{userId}
- Event Name: TripBooked
- Authorization: The user who made the booking.
- Purpose: Notifies the user when they successfully book a trip.
- Trip Cancellation (Driver)
- Channel Name: trip.cancelled.{tripId}
- Authorization: Users associated with the trip.
- Purpose: Notifies users when a trip is canceled.
- Channel Name: trip.cancelled.{tripId}
- Booking Cancellation
- Channel Name: booking.cancelled.{bookingId}
- Authorization: The user who made the booking.
- Purpose: Notifies users when a booking is canceled.
- Channel Name: booking.cancelled.{bookingId}
- Trip Starting (Passenger)
- Channel Name: passenger.trip.start.{tripId})
- Authorization: A user can only listen to this channel if they are associated with the trip.
- Purpose: Notifies users when a trip is has started.
- Channel Name: passenger.trip.start.{tripId})
- Trip Cancellation (Passenger)
- Channel Name: passenger.trip.cancelled.{tripId}
- Authorization: Users associated with the trip.
- Purpose: Notifies users when a trip is canceled.
- Channel Name: passenger.trip.cancelled.{tripId}