1. Go to this page and download the library: Download karix/karix-notification library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
public function routeNotificationForKarix()
{
return $this->phone;
}
php
use KarixTech\Karix\Broadcasting\KarixMessage;
use KarixTech\Karix\Broadcasting\KarixSMSChannel;
use KarixTech\Karix\Broadcasting\KarixWhatsappChannel;
class YourNotification extends Notification
{
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return [KarixSMSChannel::class, KarixWhatsappChannel::class];
}
public function toSmSKarix($notifiable)
{
return KarixMessage::create()
->content(['text' => 'Your message comes here']);
}
public function toWhatsappKarix($notifiable)
{
return KarixMessage::create()
->content([
'text' => 'Your message comes here',
'media' => 'url-to-media',
'location' => [
'latitude' => 'the latitude here',
'longitude' => 'the longitude here'
]
]);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.