PHP code example of abolfazlrastegar / laravel-sms

1. Go to this page and download the library: Download abolfazlrastegar/laravel-sms 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/ */

    

abolfazlrastegar / laravel-sms example snippets


use Abolfazlrastegar\\LaravelSms\\Facades\\Sms;

Sms::make('kavenegar')
    ->mobile('09123456789')
    ->template('verify')
    ->params(['token' => '123456'])
    ->sendVerifyCode();

Sms::make('smsir')
    ->mobile(['09123456789', '09123456780'])
    ->message('Your message')
    ->params(['lineNumber' => '3000XXXX'])
    ->sendMessages();

Sms::make('kavenegar')
    ->mobile(['09123456789', '09123456780'])
    ->message(['Message one', 'Message two'])
    ->params(['sender' => ['1000', '1000']])
    ->sendMessageGroup();
bash
composer vendor:publish --provider="Abolfazlrastegar\\LaravelSms\\Providers\\SmsServiceProvider" --tag=config
php artisan vendor:publish --provider="Abolfazlrastegar\\LaravelSms\\Providers\\SmsServiceProvider" --tag=migrations
php artisan migrate
bash
php artisan queue:work --queue=sms