hasanalyazidi/laravel-sendables

v3.0.1 2024-08-22 00:04 UTC

This package is not auto-updated.

Last update: 2024-10-31 01:01:46 UTC


README

Software License Travis Total Downloads

Install

  1. Add package to your composer.json
composer require hasanalyazidi/laravel-sendables
  1. 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 named otp_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.