PHP code example of astrotomic / notifynder-sender-twilio
1. Go to this page and download the library: Download astrotomic/notifynder-sender-twilio library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
astrotomic / notifynder-sender-twilio example snippets
'senders' => [
'twilio' => [
'sid' => '',
'token' => '',
'store' => false, // wether you want to also store the notifications in database
],
],
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Astrotomic\Notifynder\Senders\TwilioSender;
use Astrotomic\Notifynder\Senders\Messages\SmsMessage;
use Fenos\Notifynder\Builder\Notification;
class AppServiceProvider extends ServiceProvider
{
public function boot()
{
app('notifynder.sender')->setCallback(TwilioSender::class, function (SmsMessage $message, Notification $notification) {
return $message
->from('0123456789')
->to('9876543210')
->text($notification->getText());
});
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.