bakr / laravel-smsmisr
Laravel package for sending SMS using SMSMisr API
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/bakr/laravel-smsmisr
Requires
- php: ^8.0
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