1. Go to this page and download the library: Download macellan/netgsm 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/ */
use Illuminate\Notifications\Notification;
use Macellan\Netgsm\DTO\Sms\BaseSmsMessage;
use Macellan\Netgsm\DTO\Sms\SmsMessage;
class TestNotification extends Notification
{
public function via($notifiable)
{
return ['netgsm'];
}
public function toNetgsm(object $notifiable): BaseSmsMessage
{
return new SmsMessage('Netgsm test message');
}
}
return new OtpSmsMessage('Netgsm otp test message');
public function routeNotificationForSms()
{
return $this->phone;
}