承接 comento/laravel-sens-alimtalk 相关项目开发

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

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

comento/laravel-sens-alimtalk

最新稳定版本:v7.0.0

Composer 安装命令:

composer require comento/laravel-sens-alimtalk

包简介

Send alimtalk message, which is one of the KakaoTalk Biz Messages from ncloud.

README 文档

README

Latest Version on Packagist Software License Build Status Total Downloads

This package makes it easy to send notifications using Ncloud SENS Alimtalk with Laravel

Contents

Installation

You can install the package via composer:

composer require comento/laravel-sens-alimtalk

You can also publish the config file with:

php artisan vendor:publish --provider="Comento\SensAlimtalk\SensAlimtalkServiceProvider"

Setting up the Ncloud SENS Alimtalk service

Set your key and defaults in config/sens-alimtalk.php:

/*
|--------------------------------------------------------------------------
| NAVER CLOUD PLATFORM API
|--------------------------------------------------------------------------
|
| Go to My Page > Manage Accoutn > Manage Auth Key
| You can use a previously created authentication key or create a new api authentication key.
|
*/
'access_key' => env('NCLOUD_ACCESS_KEY', ''),
'secret_key' => env('NCLOUD_SECRET_KEY', ''),

/*
 * Service ID issued when you add a project
 */
'service_id' => '',

/*
 * KakaoTalk Channel ID ((Old) Plus Friend ID)
 */
'plus_friend_id' => '',

/*
 * SMS Failover use status
 */
'use_sms_failover' => true,

Usage

You can use this channel in your via() method:

// ...
use Comento\SensAlimtalk\SensAlimtalkChannel;
use Comento\SensAlimtalk\SensAlimtalkMessage;

class MentoringAdopt extends Notification
{
    use Queueable;

    private $mobiles;
    private $weblink_url;

    public function __construct($mobiles, $weblink_url)
    {
        $this->mobiles = $mobiles;
        $this->weblink_url = $weblink_url;
    }

    public function via($notifiable)
    {
        return [SensAlimtalkChannel::class];
    }

    public function toSensAlimtalk($notifiable)
    {
        return (new SensAlimtalkMessage())
            ->templateCode('adopt')
            ->to($this->mobiles)
            ->content('축하합니다!
현직자님의 답변이 채택되었습니다!
어떤 답변인지 확인하러 가볼까요?')
            ->button(['type' => 'WL', 'name' => '지금 보러가기', 'linkMobile' => $this->weblink_url, 'linkPc' => $this->weblink_url])
            ->utmSource('utm_source=crm-kakao&utm_medium=alimtalk&utm_campaign=mentoring-adopt&utm_term=지금 보러가기&utm_content=');
    }
}

Available Message methods

  • templateCode(string)
  • to(string|array)
  • content(string)
  • button(array)
  • useSmsFailover(boolean)
  • reserveTime(string)
  • reserveAfterMinute(int)
  • reserveAfterDay(int)
  • countryCode(string)
  • variables(array)
  • utmSource(string)
  • setPlusFriendId(string)

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email tech@comento.kr instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

License

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

统计信息

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

GitHub 信息

  • Stars: 12
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-11