emrebbozkurt/laravel-verimor-sms

Verimor SMS for Laravel Framework

1.0.2 2023-04-06 21:38 UTC

This package is auto-updated.

Last update: 2024-11-07 01:08:35 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Easy sending sms on Verimor SMS API.

NOTE: These instructions are for the latest version of Laravel.

Installation

  1. Install the package via Composer:

    composer require emrebbozkurt/laravel-verimor-sms
  2. Publish the configuration file if you want to change any defaults:

    php artisan vendor:publish --provider="Emrebbozkurt\VerimorSms\VerimorServiceProvider"

Configuration

Add this fields to .env file:

VERIMOR_USERNAME=908501234567
VERIMOR_API_KEY=xxxxxxx

You can set from verimor config file the default values for extra parameters:

return [
    'username' => env('VERIMOR_USERNAME', '908501234567'),
    'password' => env('VERIMOR_API_KEY', 'xxxxxxx'),
    'custom_id' => uniqid()
    'datacoding' => '0',
    'valid_for' => '48:00',
];

Usage

Simple Send:

$sms = Verimor::send('+905431231234', 'Hello');
$response = $sms->response();
$status = $sms->status();

Send with extra parameters:

$sms = Verimor::send('+905431231234', 'Hello', ['custom_id' => uniqid(), 'datacoding' => '0', 'valid_for' => '48:00']);
$response = $sms->response();
$status = $sms->status();

Support

Please use GitHub for reporting bugs, and making comments or suggestions.

Copyright and License

laravel-verimor-sms was written by Emre Bozkurt and is released under the MIT License.

Copyright (c) 2022 Emre Bozkurt