LogoLogo
  • Introduction
  • What's New?
  • Upgrade Guide
  • Getting Started
    • Requirements
    • Installation
  • Defining Channels
    • Configuration
    • Retrieving Channels
  • Creating and Sending Notifications
    • Defining Notifications
    • Notifiables
    • Sending Notifications
  • Providers
    • DatabaseProvider
    • EmailProvider
    • SlackProvider
      • Slack BlockKit
    • Creating Custom Providers
  • Testing
    • Coming Soon
  • Reference
    • NotificationService
    • BaseNotification
    • SendsNotifications
    • INotifiable
    • BaseProvider
      • DatabaseProvider
        • DatabaseNotificationService
        • HasDatabaseNotifications
        • DatabaseNotificationCursor
        • DatabaseNotification
      • EmailProvider
      • SlackProvider
        • SlackMessage
          • EventMetadata
          • ActionsBlock
          • ContextBlock
          • DividerBlock
          • HeaderBlock
          • ImageBlock
          • SectionBlock
          • ButtonElement
          • ConfirmObject
          • ImageElement
          • TextObject
          • PlainTextOnlyTextObject
  • ForgeBox
  • GitHub
Powered by GitBook
On this page
  • getProviderName
  • notify
  • routeNotificationFor
  1. Reference

BaseProvider

PreviousINotifiableNextDatabaseProvider

Last updated 1 year ago

getProviderName

Returns the name for this Provider.

This name should be the same across all different channels using the same Provider.

Name
Type
Required
Default
Description

No arguments

Return: (string) The Provider name

notify

Sends a to a through this Channel instance using the configured Provider.

This method will be called once for each receiving the notification, even if the method was called with multiple instances.

When implementing this method, make sure not to modify the instance as this instance will be used for each .

Name
Type
Required
Default
Description

notifiable

true

notification

true

The Notification instance to send to the notifiable.

Return: instance, after it has been sent to the .

routeNotificationFor

Determines the route the notification should be sent to by calling the routeNotificationFor{ChannelType} method, if it exists.

Name
Type
Required
Default
Description

type

string

true

The type of channel to route to.

notifiable

true

The notifiable instance the notification is being sent to.

channelName

string

true

The name of the channel to route to.

additionalArgs

struct

false

{}

Any additional arguments to pass to the routing method (to{ChannelType} method).

optional

boolean

false

false

Boolean flag determining if the routing method is optional or not.

Return: The result of the routeNotificationFor{ChannelType} method. The variable type depends on the Provider.

The instance receiving the .

INotifiable
Notifiable
Notification
BaseNotification
INotifiable
Notification
Notifiable
Notifiable
Notifiable
Notification
Notifiable
Notification
INotifiable
NotificationService#notify