PHP code example of yhshanto / walletmix-sms-channel
1. Go to this page and download the library: Download yhshanto/walletmix-sms-channel 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/ */
/**
* Get the Walletmix / SMS representation of the notification.
*
* @param mixed $notifiable
* @return WalletmixMessage
*/
public function toWalletmix($notifiable)
{
return (new WalletmixMessage)
->content('Your SMS message content');
}
/**
* Get the Walletmix / SMS representation of the notification.
*
* @param mixed $notifiable
* @return WalletmixMessage
*/
public function toWalletmix($notifiable)
{
return (new WalletmixMessage)
->content('Your unicode message')
->unicode();
}
/**
* Get the Walletmix / SMS representation of the notification.
*
* @param mixed $notifiable
* @return WalletmixMessage
*/
public function toWalletmix($notifiable)
{
return (new WalletmixMessage)
->content('Your SMS message content')
->from('15554443333');
}
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* Route notifications for the Walletmix channel.
*
* @param \Illuminate\Notifications\Notification $notification
* @return string
*/
public function routeNotificationForWalletmix($notification)
{
return $this->phone;
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.