| Package Data | |
|---|---|
| Maintainer Username: | zanozik |
| Maintainer Contact: | zanozik@gmail.com (ZanoZik) |
| Package Create Date: | 2017-02-05 |
| Package Last Update: | 2021-12-08 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-18 15:27:37 |
| Package Statistics | |
|---|---|
| Total Downloads: | 824 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 2 |
| Total Watchers: | 1 |
| Total Forks: | 2 |
| Total Open Issues: | 1 |
You can install the package via composer:
composer require zanozik/semysms
You must install the service provider:
// config/app.php
'providers' => [
...
NotificationChannels\SemySMS\SemySMSServiceProvider::class,
],
Sign up on SemySMS and create your token in your Control Panel -> API.
Add the following section and fill in the details there (you can also use your .env file to store your credentials):
// config/services.php
...
'semysms' => [
'token' => env('SEMYSMS_TOKEN', '12345678901234567890'),
'device' => env('SEMYSMS_DEVICE', '12345')
],
...
You can now use the channel in your via() method inside the Notification class.
use NotificationChannels\SemySMS\SemySMSChannel;
use NotificationChannels\SemySMS\SemySMSMessage;
use Illuminate\Notifications\Notification;
class InvoicePaid extends Notification{
public function via($notifiable){
return [SemySMSChannel::class];
}
public function toSmsGatewayMe($notifiable){
return (new SemySMSMessage)->text('Your invoice has been paid');
}
}
You should add a routeNotificationForSemySMS() method in your notifiable model:
...
/**
* Route notifications for the SemySMS channel.
*
* @return int
*/
public function routeNotificationForSemySMS(){
return $this->phone_number;
}
...
text($text): (string) SMS Text.The MIT License (MIT). Please see License File for more information.