parhaaam / sendsms
The easiest way to send Sms inside your Laravel App
v1.0.0
2023-04-03 05:54 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^9.0
- kavenegar/laravel: ^1.3
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.8
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
- spatie/laravel-ray: ^1.26
This package is not auto-updated.
Last update: 2025-01-13 02:00:39 UTC
README
Easily send sms in laravel with any sms service provider.
Supported Providers
Installation
- install the package via composer:
composer require parhaaam/sendsms
- 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.