codechito/laravel-transmitmessage-channel is a Laravel package for :package_description.
It currently has 0 GitHub stars and 6 downloads on Packagist.
Install it with composer require codechito/laravel-transmitmessage-channel.
Discover more Laravel packages by codechito
or browse all Laravel packages to compare alternatives.
Last updated
Please see this repo for instructions on how to submit a channel proposal.
This package makes it easy to send notifications using TransmitMessage with Laravel 5.5+ and 6.x
You can install the package via composer:
composer require codechito/laravel-transmitmessage-channel
Add the environment variables to your config/services.php:
// config/services.php
...
'transmitmessage' => [
'apiKey' => env('TRANSMITMESSAGE_APIKEY'),
],
...
Add your TransmitMessage API Key to your .env:
// .env
...
TRANSMITMESSAGE_APIKEY=
],
...
You can use the channel in your via() method inside the notification:
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;
use NotificationChannels\TransmitMessage\TransmitMessageChannel;
use NotificationChannels\TransmitMessage\TransmitMessageMessage;
class SmsSend extends Notification
{
use Queueable;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return [TransmitMessageChannel::class];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toTransmitMessage($notifiable)
{
return (new TransmitMessageMessage())
->setMessage('The introduction to the notification.')
->setRecipient('639481234567')
->setSender('SHARKY');
}
}
A list of all available options
Please see CHANGELOG for more information what has changed recently.
$ composer test
if you encounter these error
certificate problem: unable to get local issuer certificate
for production we recommend to follow these link for fixing these issue
https://ourcodeworld.com/articles/read/211/unirest-for-php-ssl-certificate-problem-unable-to-get-local-issuer-certificate
but if you are in a rush and working only in local enviroment you can just replace the following
https://api.transmitmessage.com/v1/ with http://api.transmitmessage.com/v1/these will fixed the issue temporarily
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.