bakr/laravel-smsmisr
最新稳定版本:v1.0.0
Composer 安装命令:
composer require bakr/laravel-smsmisr
包简介
Laravel package for sending SMS using SMSMisr API
README 文档
README
A modern Laravel package for sending SMS messages using the SMSMisr gateway.
Built with simplicity, flexibility, and modern Laravel practices in mind.
📚 Table of Contents
✨ Features
- 📬 Send single or bulk SMS messages
- ⏱️ Support for scheduling future messages
- 🧾 Laravel Facade support
- 🛡️ Clean and tested codebase
- ✅ Supports Laravel 10+ out of the box
- 🔄 Simple configuration and usage
📦 Installation
composer require bakr/smsmisr
Laravel 10+ will auto-discover the service provider and facade.
⚙️ Configuration
You can publish the config file:
php artisan vendor:publish --tag=smsmisr-config
This will create a config file at config/smsmisr.php:
return [ 'username' => env('SMSMISR_USERNAME'), 'password' => env('SMSMISR_PASSWORD'), 'sender_id' => env('SMSMISR_SENDER_ID'), ];
Then set your .env:
SMSMISR_USERNAME=your_username SMSMISR_PASSWORD=your_password SMSMISR_SENDER_ID=your_sender_id
🧪 Usage
Send a Single SMS
use Bakr\Smsmisr\Facades\Smsmisr; Smsmisr::send('201234567890', 'Your verification code is 123456');
Send to Multiple Recipients
Smsmisr::send(['201234567890', '201112223334'], 'Promo: 50% off today!');
Schedule an SMS
Smsmisr::schedule('201234567890', 'Happy New Year 🎉', now()->addMinutes(10));
✅ Requirements
PHP ^8.1
Laravel ^10.0 or newer
No external dependencies (uses Laravel's native HTTP client)
💡 Examples
Controller Example:
public function notifyUser(Request $request) { Smsmisr::send($request->phone, 'Welcome to our platform!'); return response()->json(['status' => 'sent']); }
Smsmisr::schedule('201234567890', 'Don’t miss our event tomorrow!', now()->addDay());
🤝 Contributing
PRs are welcome! Please open issues first for any breaking or feature discussions.
To contribute locally:
git clone https://github.com/bakr/smsmisr.git cd smsmisr composer install composer test
Make sure your code is clean and tested before submitting a PR.
📄 License
This package is open-sourced software licensed under the MIT license.
🙌 Credits
Developed with ❤️ by Mohamed Bakr
Inspired by the need for clean SMS integrations in Laravel projects
Built for the community — feel free to star ⭐️ and share
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-05