1. Go to this page and download the library: Download dmn/txtbox 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/ */
namespace Dmn\Txtbox\Examples;
use Dmn\Txtbox\Channels\Txtbox;
use Dmn\Txtbox\Messages\TxtboxMessage;
use Illuminate\Notifications\Notification;
class SmsNotification extends Notification
{
/**
* Get the notification channels.
*
* @param mixed $notifiable
* @return array|string
*/
public function via($notifiable)
{
return [Txtbox::class];
}
/**
* Get Txtbox message
*
* @param mixed $notifiable
*
* @return TxtboxMessage
*/
public function toTxtbox($notifiable): TxtboxMessage
{
return (new TxtboxMessage())
->setMobileNumber($notifiable['mobile_number'])
->setMessage('This is a sample sms from package channel txtbox');
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.