// config/services.php
'termii' => [
'api_key' => env('TERMII_API_KEY'),
'from' => env('TERMII_FROM'),
'channel' => 'dnd' //because I know you love 'do not disturb' mode 😉
]
use Infinitypaul\Termii\TermiiChannel;
use Infinitypaul\Termii\TermiiMessage;
use Illuminate\Notifications\Notification;
class WelcomeSMS extends Notification
{
public function via($notifiable)
{
return [TermiiChannel::class]; // see? pie!
}
public function toTermii($notifiable)
{
return (new TermiiMessage())
->content("Thanks For Subscribing to infinitypaul.medium.com. We promise to only send interesting stuff, no cat videos... well, maybe just one.");
}
}
public function routeNotificationForTermii()
{
return $this->phone; // where `phone` is a field in your users table;
}
public function toTermii($notifiable)
{
return (new TermiiMessage())
->content("Thanks For Subscribing to infinitypaul.medium.com. We promise to only send interesting stuff, no cat videos... well, maybe just one.")
->to("234100000001");
}
composer test //(We promise it won't explode.)
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.