bluecloud/sms-queue 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bluecloud/sms-queue

Composer 安装命令:

composer require bluecloud/sms-queue

包简介

Sms Queue

README 文档

README

Queue messages from your Laravel app to your SMS API.

DISCLAIMER This package does not handle the actual sending of the messages to the recepient. You will need an SMS solution for that. This will however ease the task of scheduling and queueing an SMS from anywhere in your code

Quick Guide

Install the package via composer

composer require bluecloud/sms-queue

Publish package service provider

php artisan vendor:publish --provider=Bluecloud\SmsQueue\SmsQueueServiceProvider

Run the migrations to create sms queue table

php artisan migrate

Queueing messages

use Bluecloud\SmsQueue\Models\Message;

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

Sending messages

php artisan sms:send

To limit the number of messages to send per batch set the env variable SMS_QUEUE_DELIVERIES_PER_BATCH.

To set a one-time limit use php artisan sms:send --limit=10

You can schedule the messages to be sent at an interval with Laravel Scheduler

// 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();
    }
}

Configuration

To set your config, create the following entries in your env file and replace the default values as desired

SMS_QUEUE_DELIVERIES_PER_BATCH=100

SMS_QUEUE_MESSENGER_URL=http://localhost

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固