PHP code example of grupodkt / notification-channel-sms
1. Go to this page and download the library: Download grupodkt/notification-channel-sms 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/ */
grupodkt / notification-channel-sms example snippets
use NotificationChannels\Sms\SmsChannel;
use NotificationChannels\Sms\SmsMessage;
use Illuminate\Notifications\Notification;
class AccountApproved extends Notification
{
public function via($notifiable)
{
return [SmsChannel::class];
}
public function toSms($notifiable)
{
return (new SmsMessage())
->content("Your {$notifiable->service} account was approved!");
}
}
public function routeNotificationForSms()
{
return $this->celular;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.