cjworx / laravel-smsmkt
A Laravel client for sending SMS via SMSMKT.
1.0.1
2022-10-12 10:43 UTC
Requires
- php: ^7.3
- illuminate/contracts: ^8.0
- spatie/laravel-package-tools: ^1.12.1
This package is auto-updated.
Last update: 2024-05-12 14:08:44 UTC
README
This package is a wrapper around SMSMKT client for Laravel.
Installation
You can install the package via composer:
composer require cjworx/laravel-smsmkt
You can publish the config file with:
php artisan vendor:publish --tag="smsmkt-config"
Usage
Add your SMSMKT credentials into .env file
SMSMKT_API_KEY=
SMSMKT_SECRET_KEY=
SMSMKT_OTP_PROJECT_KEY=
SMSMKT_SENDER_NAME=
Example of basic usage
<?php
use CJWORX\LaravelSMSMKT\SMSMKTClient;
// Send SMS
SMSMKTClient::send('0811111111', 'Hello World!');
// Send OTP
$token = SMSMKTClient::sendOTP('0811111111');
// Verify OTP
$verified = SMSMKTClient::verifyOTP($token, '123456');
License
The MIT License (MIT). Please see License File for more information.