trezrayan/raygan-sms-notification-channel is a Laravel package for raygan sms channel for laravel 5.3+.
It currently has 0 GitHub stars and 0 downloads on Packagist.
Install it with composer require trezrayan/raygan-sms-notification-channel.
Discover more Laravel packages by trezrayan
or browse all Laravel packages to compare alternatives.
Last updated
This package makes it easy to send notifications using RayganSms API with Laravel 5.3+.
با استفاده از composer قادر به نصب این سرویس می باشید:
composer require trezrayan/raygan-sms-notification-channel
با استفاده از متد ()via این کانال را به notefication خود اضافه نموده و متد toRayganSms را مطابق زیر جهت ارسال اعلان اضافه می نماییم:
use Illuminate\Notifications\Notification;
use NotificationChannels\RayganSms\RaygansmsChannel;
use NotificationChannels\RayganSms\TextMessage;
use NotificationChannels\RayganSms\AuthCodeMessage;
class AccountApproved extends Notification
{
public function via($notifiable)
{
return [RayganSmsChannel::class];
}
public function toRayganSms($notifiable)
{
return (new TextMessage)
->content("your message to send ...");
}
}
...
public function toRayganSms($notifiable)
{
return (new AuthCodeMessage)
->content('Welcome');
}
...
...
public function toRayganSms($notifiable)
{
return (new AuthCodeMessage)
->content('کد تایید شما : 325689')
->autoGenerate(false);
}
use Notifiable;
public function routeNotificationForRayganSms()
{
return $this->phone_number;
}
لایسنس این پکیج (MIT) می باشد . جهت اطلاعات در مورد این لایسنس به License File مراجعه نمایید.