承接 broken-titan/laravel-mparticle-channel 相关项目开发

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

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

broken-titan/laravel-mparticle-channel

Composer 安装命令:

composer require broken-titan/laravel-mparticle-channel

包简介

mParticle notification channel for Laravel.

README 文档

README

This package makes it easy to integrate Laravel with mParticle for sending notifications.

Contents

Installation

Install this package with Composer:

composer require broken-titan/laravel-mparticle-channel

Configuration

Before you may begin using the mParticle service, you must obtain authentication information from mParticle. The username and password must be assigned to MPARTICLE_USERNAME and MPARTICLE_PASSWORD in your .env file. You will also need to configure your mParticle pod using MPARTICLE_POD if you are not on the US1 pod.

By default the config file is merged with services.php and are accessible using config("services.mparticle").

Usage

Once installation is complete, you can send events to mParticle by creating standard Laravel notifications. For example:

    namespace App\Notifications;

    use Illuminate\Notifications\Notification;
    use BrokenTitan\mParticle\Channels\MParticleChannel;
    use BrokenTitan\mParticle\Messages\MParticleEventMessage;

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

        public function toMParticle($notifiable) : MParticleEventMessage {
            $data = [
                "property" => "value"
            ];
        
            return new MParticleEventMessage("user_created", MParticleEventMessage::TRANSACTON, $data);
        }
    }   

You will also want to define a routeNotificationForMParticle() function on your Notifiable classes. They need to return an array with user identities that you want to send. For example:

public function routeNotificationForMParticle() {
    return ["customer_id" => 123, "email" => "example@domain.com"];
}

Testing

$ composer test

Security

If you discover any security issues that would affect existing users, please email contact@brokentitan.com instead of using the issue tracker.

Contributing

Feel free to contribute to the package.

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-02-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固