PHP code example of burakaktna / laravel-vatansms
1. Go to this page and download the library: Download burakaktna/laravel-vatansms 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/ */
burakaktna / laravel-vatansms example snippets
/config/vatansms.php
php
use Burakaktna\LaravelVatanSMS\VatanSMSChannel;
use Burakaktna\LaravelVatanSMS\VatanSMSMessage;
use Illuminate\Notifications\Notification;
class AccountApproved extends Notification
{
public function via($notifiable)
{
return [VatanSMSChannel::class];
}
public function toVatanSMS($notifiable)
{
return (new VatanSMSMessage())
->content("Your {$notifiable->service} account was approved!");
}
}
php
use Burakaktna\LaravelVatanSMS\Facades\VatanSMS;
function sendSms(string $content, array $number){
VatanSMS::sendSms($content, $number)->submit();
}