Download the PHP package cuongnd88/delivery-channels without Composer
On this page you can find all versions of the php package cuongnd88/delivery-channels. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cuongnd88/delivery-channels
More information about cuongnd88/delivery-channels
Files in cuongnd88/delivery-channels
Package delivery-channels
Short Description Laravel Notification Delivery Channels
License
Informations about the package delivery-channels
Laravel Notification Delivery Channels
Laravel ships with a handful of notification channels, but you may want to more drivers to deliver notifications via other channels. The delivery-channels makes it simple.
The package currently supports these drivers:
- Twilio
1-Install cuongnd88/delivery-channels using Composer.
2-Add the following service provider in config/app.php
For further configurations, you can modify the configuration by copying it to your local config directory:
3-Update credentails in config/channels.php or env file
Sample Usage
In the Laravel notification class, it contains a via method and a variable number of message building methods (such as toMail or toDatabase) that convert the notification to a message optimized for that particular channel.
Twilio Channel
You have to define a toTwilio method on the notification class. This method will receive a $notifiable entity and should return a Cuongnd88\DeliveryChannel\Messages\TwilioMessage instance or array. Let's take a look at an example toTwilio method:
Demo
This is demo soure code. Laravel Colab
All versions of delivery-channels with dependencies
illuminate/database Version ^6.0|^7.0
illuminate/http Version ^6.0|^7.0
illuminate/notifications Version ^6.0|^7.0
illuminate/routing Version ^6.0|^7.0
illuminate/support Version ^6.0|^7.0
twilio/sdk Version ^6.0