PHP code example of fitprime / l9-smsapi-notification-channel
1. Go to this page and download the library: Download fitprime/l9-smsapi-notification-channel 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/ */
fitprime / l9-smsapi-notification-channel example snippets
$user->notify(new TestSms('This is a test message'));
use Illuminate\Notifications\Notification;
use Fitprime\L9SmsApi\L9SmsApiChannel;
use Fitprime\L9SmsApi\L9SmsApiMessage;
class TestSms extends Notification
{
public function via($notifiable)
{
return [L9SmsApiChannel::class];
}
public function toL9Smsapi($notifiable)
{
return (new L9SmsApiMessage())
->content( 'Text message content' )
->to($notifiable->phone_number);
}
}