PHP code example of bluecloud / sms-queue

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

    

bluecloud / sms-queue example snippets


use Bluecloud\SmsQueue\Models\Message;

Message::queue('0888800800', 'Test message');
Message::queue('0888800800', 'Test message', '2021-03-13 09:30:00');

// app/Console/Kernel.php

use Illuminate\Console\Scheduling\Schedule;

use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('sms:send')->everyMinute()->runInBackground();
    }
}

terminal
php artisan vendor:publish --provider=Bluecloud\SmsQueue\SmsQueueServiceProvider
terminal
php artisan migrate
terminal
php artisan sms:send