You can install the package via composer:
composer require rosemalejohn/laravel-message-whiz
The package will automatically register itself.
You can publish the configurations files with:
php artisan vendor:publish --provider="Rosemalejohn\MessageWhiz\MessageWhizServiceProvider"
To use MessageWhiz on your Laravel notifications, just add \Rosemalejohn\MessageWhiz\NotificationChannel::class
on notification's via
method
public function via($notifiable)
{
return ['database', 'broadcast', \Rosemalejohn\MessageWhiz\NotificationChannel::class]
}
and then implement the function
public function toSms($notifiable): array
{
return [
'recipient' => $notifiable->phone_number,
'message_body' => 'John Doe sent a like'
];
}
For complete API documentation, head over to MessageWhiz API documentation
The MIT License (MIT). Please see License File for more information.