Skip to content

parhaaam/SendSms

Repository files navigation

The easiest way to send Sms inside your Laravel App

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Easily send sms in laravel with any sms service provider.

Supported Providers

Provider
Kavenegar
SMS.IR

Installation

  1. install the package via composer:
composer require parhaaam/sendsms
  1. publish the config file with:
php artisan vendor:publish --tag="sendsms-config"

This is the contents of the published config file:

return [

    'default' => 'kavenegar',
    'drivers' => [
        'kavenegar' => [
            'key'  => env('kavenegar_key', ''),
        ],
        'smsir' => [
            'key'    => env('smsir_key', ''),
            'secret' => env('smsir_key', ''),
        ]
    ]
];

Usage

// Send Lookup sms
$sendSms = new Parhaaam\SendSms();
$sendSms->sendLookup($receptor = "__phone_number__", $template = "loginVerify", $tokens = ["Test"]);
// will send sms using default sms provider which has been set in config/sendsms.php

// Send Lookup sms with sms.ir
$sendSms = new SendSms();
$sendSms
    ->via('smsir')
    ->sendLookup($receptor = "__phone_number__", $template = "19737", ["token_one_name" => "token_value", "token_two_name" => "token_two_value"]);

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

The easiest way to send sms inside your Laravel Application

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages