You can install this package via composer:
composer require laravel-notification-channels/smspoh
Add your SMSPoh token, default sender name (or phone number) to your config/services.php:
// config/services.php ... 'smspoh' => [ 'endpoint' => env('SMSPOH_ENDPOINT', 'https://smspoh.com/api/v2/send'), 'token' => env('SMSPOH_TOKEN', 'YOUR SMSPOH TOKEN HERE'), 'sender' => env('SMSPOH_SENDER', 'YOUR SMSPOH SENDER HERE') ], ...
You can use the channel in your via() method inside the notification:
use Illuminate\Notifications\Notification; use NotificationChannels\Smspoh\SmspohMessage; class AccountApproved extends Notification { public function via($notifiable) { return ["smspoh"]; } public function toSmspoh($notifiable) { return (new SmspohMessage)->content("Your account was approved!"); } }
In your notifiable model, make sure to include a routeNotificationForSmspoh() method, which returns a phone number or an array of phone numbers.
Ref : https://github.com/laravel-notification-channels/smspoh
Publish By: admin