cjworx / laravel-smsmkt
A Laravel client for sending SMS via SMSMKT.
1.0.3
2024-09-26 07:43 UTC
Requires
- php: ^7.3|^8.0
- illuminate/contracts: ^8.0|^9.0|^10.0|^11.0
- spatie/laravel-package-tools: ^1.12.1
This package is auto-updated.
Last update: 2025-07-26 09:17:06 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.