https://github.com/hexters/esms-notification-channel
Laravel notification channel for https://esms.com.my
https://github.com/hexters/esms-notification-channel
Last synced: 12 months ago
JSON representation
Laravel notification channel for https://esms.com.my
- Host: GitHub
- URL: https://github.com/hexters/esms-notification-channel
- Owner: hexters
- License: mit
- Created: 2019-07-02T00:34:23.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-15T07:59:13.000Z (over 6 years ago)
- Last Synced: 2025-03-16T14:57:08.675Z (about 1 year ago)
- Language: PHP
- Size: 9.77 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ESMS Notification Channel for Laravel
How to use the Esms channel? firs you need to create account from the https://esms.com.my
Install the package with composer
```
composer require hexters/esms-notification-channel
```
open the .env configuratin, and add the code below
```
ESMS_USER=
ESMS_PASSWORD=
```
Set route notification in User class or our custom User class
```
. . .
Class User extends Authenticatable {
. . .
public function routeNotificationForEsms($notification) {
return $this->phone;
}
. . .
```
How to use? in the notification class please add.
```
content('Your SMS message content');
}
```
## SMS Manualy
If you will send SMS manualy, you can try
```
. . .
use Hexters\Esms\SendEsms;
. . .
$sms = new sendEsms;
$sms->to(608123481234)->message("RM0.00 Your OTP number is " . rand(1111,9999))->send();
```
Happy codding... ☕☕☕