承接 coreproc/laravel-notification-channel-playsms 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

coreproc/laravel-notification-channel-playsms

Composer 安装命令:

composer require coreproc/laravel-notification-channel-playsms

包简介

This package makes it easy to send notifications using playSMS with Laravel 5.5+ and 6.0

README 文档

README

Latest Version on Packagist Software License StyleCI Quality Score Total Downloads

This package makes it easy to send notifications using playSMS with Laravel 5.5+ and 6.0

Contents

Installation

Install this package with Composer:

composer require coreproc/laravel-notification-channel-playsms

Setting up the playSMS service

A web server with playSMS installed is required to use this service. Visit https://help.playsms.org/en/ to check out set up / installation instruction for playSMS.

Once you have a playSMS server up and running, you can obtain an API key by going to My Account -> User Configuration. You'll be able to see your webservices token in that page. Use this as your API key.

Add the base URL of your playSMS server, your username, and your API key to your config/services.php.

// config/services.php
....
'playsms' => [
    'base_url' => env('PLAYSMS_BASE_URL'),
    'username' => env('PLAYSMS_USERNAME'),
    'api_key' => env('PLAYSMS_API_KEY'),
],
...

Usage

Sending a playSMS notification can be done by making a Notification class with the following:

use CoreProc\NotificationChannels\PlaySms\PlaySmsChannel;
use CoreProc\NotificationChannels\PlaySms\PlaySmsMessage;
use Illuminate\Notifications\Notification;

class AccountActivated extends Notification
{
    public function via($notifiable)
    {
        return [PlaySmsChannel::class];
    }

    public function toPlaySms($notifiable)
    {
        return (new PlaySmsMessage())->setMessage('Your account has been activated!');
    }
}

Available Message methods

The PlaySmsMessage has only one method available as of now:

setMessage($message)

Use this method to set the content of the SMS being sent.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email ask@coreproc.com instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

About CoreProc, Inc.

CoreProc, Inc. is a software development company that provides software development services to startups, digital/ad agencies, and enterprises.

Learn more about us on our website.

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固