PHP code example of karix / karix-sms-notification
1. Go to this page and download the library: Download karix/karix-sms-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/ */
karix / karix-sms-notification example snippets
// config/services.php
...
'karix' => [
'id' => env('KARIX_ID'),
'token' => env('KARIX_TOKEN'),
],
...
public function routeNotificationForKarix()
{
return $this->phone;
}
php
use Bitfumes\KarixNotificationChannel\KarixChannel;
use Bitfumes\KarixNotificationChannel\KarixMessage;
use Illuminate\Notifications\Notification;
class YourNotification extends Notification
{
public function via($notifiable)
{
return [KarixChannel::class];
}
public function toKarix($notifiable)
{
return KarixMessage::create()
->from('+1XXXXXXXXXX')
->content('Your message comes here');
}
}