PHP code example of hasanalyazidi / laravel-sendables

1. Go to this page and download the library: Download hasanalyazidi/laravel-sendables library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hasanalyazidi / laravel-sendables example snippets


$sms = new SMSNotification('SMS Message', '966000000000');
$sms->send();

$otp = new OtpVerifier('966000000000');
$otp->send();

'limits' => [
    'default' => OtpProvider::DEFAULT_LIMITS,

    'providers' => [
        OurSMSV2OtpProvider::class => [
            'resendAfterSeconds' => [120, 300],
            'maxSendsPerHour'    => 5,
        ],
    ],
],

$otp->getResendAfter(); // seconds until send() accepts the next code, 0 = now
$otp->canResend();      // false: hide the countdown and the resend button (testers, passwords)
bash
php artisan migrate
bash
php artisan vendor:publish --provider="HasanAlyazidi\Sendables\Providers\SendablesServiceProvider" --tag="config"
bash
php artisan vendor:publish --provider="HasanAlyazidi\Sendables\Providers\SendablesServiceProvider" --tag="migrations"
bash
php artisan vendor:publish --provider="HasanAlyazidi\Sendables\Providers\SendablesServiceProvider" --tag="resources-lang-en"