This package makes it easy to send sms notifications with VatanSMS on Laravel.
You can install the package via composer:
composer require burakaktna/laravel-vatansms
VATANSMS_CUSTOMER_NO=YOUR VATANSMS CUSTOMER NO
VATANSMS_USERNAME=YOUR VATANSMS USERNAME
VATANSMS_PASSWORD=YOUR VATANSMS PASSWORD
VATANSMS_ORIGINATOR=YOUR VATANSMS ORIGINATOR
Run php artisan vendor:publish --provider="Burakaktna\LaravelVatanSMS\VatanSMSServiceProvider"
/config/vatansms.php
Now you can use the channel in your via()
method inside the notification:
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!");
}
}
You can also send sms with facades:
use Burakaktna\LaravelVatanSMS\Facades\VatanSMS;
function sendSms(string $content, array $number){
VatanSMS::sendSms($content, $number)->submit();
}
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email burak@leafletsoft.com.tr instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.