<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
undjike / lmt-laravel-notification-channel example snippets
return [
//...
'lmt' => [
'key' => env('LMT_API_KEY'), // Your credentials are expected here
'secret' => env('LMT_API_SECRET')
],
];
namespace App\Notifications;
use Illuminate\Notifications\Notification;
use Undjike\LmtNotificationChannel\LmtChannel;
use Undjike\LmtNotificationChannel\LmtMessage;
class LmtNotification extends Notification
{
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return [LmtChannel::class]; // or return 'lmt';
}
/**
* @param $notifiable
* @return mixed
*/
public function toLmt($notifiable)
{
return LmtMessage::create()
->body('Type here you message content...')
->sender('Brand name');
// or return 'Type here you message content...';
}
}
/**
* Attribute to use when addressing LMT SMS notification
*
* @returns string|array
*/
public function routeNotificationForLmt()
{
return $this->phone_number; // Can be a string or an array of valid phone numbers
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.