hasanalyazidi / laravel-sendables
Send SMS and OTP
v3.0.1
2024-08-22 00:04 UTC
Requires
- php: >=7.1|^8.0
- adrii/whatsapp-api: ^0.7.0
- guzzlehttp/guzzle: ^7.3
- illuminate/contracts: ^6|^7|^8|^9|^10
- illuminate/support: ^6|^7|^8|^9|^10
Requires (Dev)
- laravel/framework: ^6|^7|^8|^9|^10
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^6|^7|^8|^9|^10
README
Install
- Add package to your
composer.json
composer require hasanalyazidi/laravel-sendables
- Migrate package tables or publish migrations first then migrate
php artisan migrate
Publish package files
Publish config file (Required)
php artisan vendor:publish --provider="HasanAlyazidi\Sendables\Providers\SendablesServiceProvider" --tag="config"
Publish migrations (Optional)
php artisan vendor:publish --provider="HasanAlyazidi\Sendables\Providers\SendablesServiceProvider" --tag="migrations"
Publish language resources (Optional)
English
php artisan vendor:publish --provider="HasanAlyazidi\Sendables\Providers\SendablesServiceProvider" --tag="resources-lang-en"
Arabic
php artisan vendor:publish --provider="HasanAlyazidi\Sendables\Providers\SendablesServiceProvider" --tag="resources-lang-ar"
All supported languages
php artisan vendor:publish --provider="HasanAlyazidi\Sendables\Providers\SendablesServiceProvider" --tag="resources-lang-all"
Usage
SMS
$sms = new SMSNotification('SMS Message', '966000000000'); $sms->send();
OTP
$otp = new OtpVerifier('966000000000'); $otp->send();
- WhatsApp:
Add a message template namedotp_code
, type (Authentication
) with your app supported languages.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email hassanx220@gmail.com instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.