Download the PHP package hasanalyazidi/laravel-sendables without Composer
On this page you can find all versions of the php package hasanalyazidi/laravel-sendables. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hasanalyazidi/laravel-sendables
More information about hasanalyazidi/laravel-sendables
Files in hasanalyazidi/laravel-sendables
Package laravel-sendables
Short Description Send SMS and OTP
License MIT
Homepage https://github.com/HasanAlyazidi/laravel-sendables
Informations about the package laravel-sendables
laravel-sendables
Install
-
Add package to your
composer.json - Migrate package tables or publish migrations first then migrate
Publish package files
Publish config file (Required)
Publish migrations (Optional)
Publish language resources (Optional)
English
Arabic
All supported languages
Usage
SMS
OTP
- WhatsApp:\
Add a message template named
otp_code, type (Authentication) with your app supported languages.
OTP limits
Codes sent by the server (WhatsApp, SMS) are limited per mobile number. Set them in
config/sendables.php under otp.limits; a provider takes its own value first, then the
default one, then OtpProvider::DEFAULT_LIMITS.
| Limit | Default | Meaning |
|---|---|---|
resendAfterSeconds |
[60, 120, 300] |
Wait after the 1st, 2nd, 3rd... code of the last hour; the last value repeats. A single number means the same wait every time. |
maxSendsPerHour |
10 |
Codes per hour per mobile number. |
maxWrongAttempts |
5 |
Wrong guesses allowed per code, then a new code is needed. Tester numbers, whose code never changes, get this many per 2 minutes. |
verifiedForMinutes |
60 |
How long a verified code proves the number to isAuthenticated(). |
Tell the client when it may ask for another code, and pass it in your send response:
A refused send returns false with the error too-many-requests, and too many wrong
guesses return too-many-attempts; both have messages in the package language files.
Send limits and verifiedForMinutes only concern codes the server sends: Firebase (the
phone sends it), testers and password logins have nothing to wait for, so their
getResendAfter() is always 0, and entries for them under providers are ignored.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-sendables with dependencies
adrii/whatsapp-api Version ^0.7.0
guzzlehttp/guzzle Version ^7.3|^8.0
illuminate/contracts Version ^6|^7|^8|^9|^10|^11|^12|^13
illuminate/support Version ^6|^7|^8|^9|^10|^11|^12|^13