Download the PHP package vantomdev/smsmisr without Composer
On this page you can find all versions of the php package vantomdev/smsmisr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vantomdev/smsmisr
More information about vantomdev/smsmisr
Files in vantomdev/smsmisr
Package smsmisr
Short Description OTP and SMS API integration for SmsMisr
License MIT
Informations about the package smsmisr
Laravel SmsMisr 🚀
A powerful Laravel package for integrating SmsMisr OTP and SMS APIs. This package supports multiple Laravel versions up to 12.x, allowing easy and efficient management of SMS and OTP functionalities.
🌟 Features
- 🔑 Send OTPs to single mobile numbers using predefined templates.
- 📲 Send SMS to single or multiple mobile numbers.
- 🌐 Multiple languages support (English, Arabic, Unicode).
- 🔒 Rate Limiting to prevent abuse and reduce costs (Max 3 messages per minute, block for 5 minutes).
- 📘 Detailed Localization Support for multilingual websites.
- 🔄 Flexible configuration for Live and Testing environments.
- 🔧 Customizable API URLs for OTP and SMS requests.
- 💎 Seamless integration with Laravel 8.x to 12.x.
⚙️ Requirements
- PHP >= 8.1
- Laravel >= 8.x
- GuzzleHttp >= 7.5
🚀 Installation
Step 1: Install via Composer
Step 2: Publish the Configuration
Step 3: Publish Language Files
Step 4: Add Environment Variables
Add the following variables to your .env file:
⏰ Rate Limiting
To prevent abuse and excessive costs, this package has built-in rate limiting.
- Maximum of 3 messages per minute per mobile number.
- If exceeded, the user is blocked for 5 minutes.
- Error message displayed using localization:
You can customize this message in your language files or disable rate limiting by setting:
in config/smsmisr.php.
🌐 Localization Support
This package supports multiple languages for error messages and notifications. Default languages included:
- English (
resources/lang/vendor/smsmisr/en/messages.php) - Arabic (
resources/lang/vendor/smsmisr/ar/messages.php)
You can add more languages by creating new files under resources/lang/vendor/smsmisr/{lang_code}/messages.php.
Example:
🔥 Usage Examples
1. Send OTP
2. Send SMS
🎨 Changelog
v1.2.0
- Added Configurable API URLs:
base_url_otpandbase_url_smsare now customizable. - Refactored ServiceProvider: Improved Dependency Injection for better testability.
- Improved Rate Limiting: Now configurable from
config/smsmisr.phpor.env.
v1.1.0
- Added Rate Limiting: Max 3 messages per minute, block for 5 minutes.
- Enhanced Localization Support: Multi-language support for error messages.
- Refactored ServiceProvider: Improved Dependency Injection and Interface Binding.
- Custom Exceptions and Logging: Enhanced error handling and logging mechanism.
v1.0.0
- Initial release with OTP and SMS support.
🧑💻 Contributing
- Fork the repository.
- Create a new branch (
feature/your-feature-name). - Make your changes and commit them (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/your-feature-name). - Open a pull request.
📧 Support
For any issues, please create an issue on the GitHub Repository.
❤️ Contributors
Thanks to all contributors for helping make this package better!
⚖️ License
This project is licensed under the MIT License - see the LICENSE file for details.
🚀 Happy Coding!
All versions of smsmisr with dependencies
guzzlehttp/guzzle Version ^7.5
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0