Looking to hire Laravel developers? Try LaraJobs
This package is not available.

laravel-smsmkt maintained by cjworx

Description
A Laravel client for sending SMS via SMSMKT.
Last update
2024/09/26 09:43 (dev-master)
License
Downloads
27

Comments
comments powered by Disqus

A Laravel client for sending SMS via SMSMKT.

Latest Version on Packagist Total Downloads

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.