LaravelPackages.net
Acme Inc.
Toggle sidebar
yhshanto/itech-sms-channel

Itech flexible sms Notification Channel for laravel.

267
0
v2.0.0
About yhshanto/itech-sms-channel

yhshanto/itech-sms-channel is a Laravel package for itech flexible sms notification channel for laravel.. It currently has 0 GitHub stars and 267 downloads on Packagist (latest version v2.0.0). Install it with composer require yhshanto/itech-sms-channel. Discover more Laravel packages by yhshanto or browse all Laravel packages to compare alternatives.

Last updated

itech-sms

Installation

composer require yhshanto/itech-sms-channel

Configuration

You must add bellow code to your config/services.php

'itech' => [
    'sms' => [
        'endpoint' => 'https://api.infobip.com/api/v3/sendsms/plain?user=demo&password=demo&sender=Azzoa&SMSText=[message]&GSM=[to]&type=longSMS'
    ]
]

[message] will replaced by original message [to] will replaced by notifiable route

Add itech in via method of your notification class

/**
 * Get the notification's delivery channels.
 *
 * @param  mixed  $notifiable
 * @return array
 */
public function via($notifiable)
{
    return ['itech'];
}

also add this method in your notification class which will return a sms string

/**
 * Get the sms representation of the notification.
 *
 * @param  mixed  $notifiable
 * @return array|MailMessage|\NotificationChannels\Fcm\FcmMessage
 */
public function toItechSms($notifiable)
{
    return 'Write somthing here';
}

You must have phone attribute or routeNotificationForItech method (return a valid phone number) in your notifiable class like App\User

Star History Chart