PHPackages                             hebinet/laravel-websms-notification-channel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. hebinet/laravel-websms-notification-channel

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

hebinet/laravel-websms-notification-channel
===========================================

WebSMS Notification Channel for laravel.

v1.6.0(1mo ago)0973↓50%1MITPHPPHP ^8.0

Since Sep 6Pushed 1mo agoCompare

[ Source](https://github.com/hebinet/laravel-websms-notification-channel)[ Packagist](https://packagist.org/packages/hebinet/laravel-websms-notification-channel)[ RSS](/packages/hebinet-laravel-websms-notification-channel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (12)Used By (0)

Laravel WebSMS Notifications
============================

[](#laravel-websms-notifications)

Provides a Notification Channel for WebSms

Installation
------------

[](#installation)

You can install it using Composer:

```
composer require hebinet/laravel-websms-notification-channel
```

Then publish the config file of the package.

```
php artisan vendor:publish --provider="Hebinet\Notifications\WebSmsChannelServiceProvider" --tag=config
```

Usage
-----

[](#usage)

If a notification supports being sent as an SMS, you should define a `toWebsms` method on the notification class. This method will receive a `$notifiable` entity and should return a `string` with the content of the SMS:

```
/**
 * Get the WebSMS / SMS representation of the notification.
 *
 * @param  mixed  $notifiable
 * @return string
 */
public function toWebsms($notifiable)
{
    return 'Your SMS message content';
}
```

### Routing SMS Notifications

[](#routing-sms-notifications)

To route Nexmo notifications to the proper phone number, define a `routeNotificationForWebsms` method on your notifiable entity:

```
