PHP code example of gabeta / laravel-custom-sms-channels
1. Go to this page and download the library: Download gabeta/laravel-custom-sms-channels 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/ */
gabeta / laravel-custom-sms-channels example snippets
php
use Illuminate\Notifications\Notification;
class WelcomeNotification extends Notification
{
public function via($notifiable)
{
return ['customsms'];
}
public function toCustomSms($notifiable)
{
return "Hello Laravel Community from Ivory Coast (Côte D'ivoire)";
}
}
php
use Gabeta\CustomSmsChannels\Facades\PhoneNumber;
public function routeNotificationForCustomSms()
{
return PhoneNumber::setDialCode($this->dial_code)
->setPhone($this->phone);
}
php
use Gabeta\CustomSmsChannels\Facades\PhoneNumber;
public function routeNotificationForCustomSms()
{
return PhoneNumber::setRouteNotification($this->full_phone_number);
}