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