# BaseProvider

### getProviderName

Returns the name for this Provider.

{% hint style="warning" %}
This name should be the same across all different channels using the same Provider.
{% endhint %}

<table><thead><tr><th width="140">Name</th><th width="229">Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>No arguments</td><td></td><td></td><td></td><td></td></tr></tbody></table>

**Return**: (string) The Provider name

### notify

Sends a [`Notification`](/reference/basenotification.md) to a [`Notifiable`](/reference/inotifiable.md) through this Channel instance using the configured Provider.

This method will be called once for each [`Notifiable`](/reference/inotifiable.md) receiving the notification, even if the [`NotificationService#notify`](/reference/notificationservice.md#notify) method was called with multiple [`Notifiable`](/reference/inotifiable.md) instances.

{% hint style="warning" %}
When implementing this method, make sure not to modify the [`Notification`](/reference/basenotification.md) instance as this instance will be used for each [`Notifiable`](/reference/inotifiable.md).
{% endhint %}

<table><thead><tr><th width="140">Name</th><th width="229">Type</th><th width="123">Required</th><th width="58">Default</th><th>Description</th></tr></thead><tbody><tr><td>notifiable</td><td><a href="/pages/SQVKwkAuCy6QgkIRG8Uk"><code>INotifiable</code></a></td><td>true</td><td></td><td>The <a href="/pages/SQVKwkAuCy6QgkIRG8Uk"><code>Notifiable</code></a> instance receiving the <a href="/pages/pG0uLeeZ0niwuthcdNwE"><code>Notification</code></a>.</td></tr><tr><td>notification</td><td><a href="/pages/pG0uLeeZ0niwuthcdNwE"><code>BaseNotification</code></a></td><td>true</td><td></td><td>The Notification instance to send to the notifiable.</td></tr></tbody></table>

**Return**: [`Notification`](/reference/basenotification.md) instance, after it has been sent to the [`INotifiable`](/reference/inotifiable.md).

### routeNotificationFor

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

<table><thead><tr><th width="140">Name</th><th width="229">Type</th><th>Required</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>type</td><td><code>string</code></td><td>true</td><td></td><td>The type of channel to route to.</td></tr><tr><td>notifiable</td><td><a href="/pages/SQVKwkAuCy6QgkIRG8Uk"><code>INotifiable</code></a></td><td>true</td><td></td><td>The notifiable instance the notification is being sent to.</td></tr><tr><td>channelName</td><td><code>string</code></td><td>true</td><td></td><td>The name of the channel to route to.</td></tr><tr><td>additionalArgs</td><td><code>struct</code></td><td>false</td><td><code>{}</code></td><td>Any additional arguments to pass to the routing method (<code>to{ChannelType}</code> method).</td></tr><tr><td>optional</td><td><code>boolean</code></td><td>false</td><td><code>false</code></td><td>Boolean flag determining if the routing method is optional or not.</td></tr></tbody></table>

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://megaphone.ortusbooks.com/reference/baseprovider.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
