sirs/通讯

此软件包的最新版本(10.1.0)没有提供许可信息。

Laravel 5 SIRS 通讯软件包

10.1.0 2024-01-10 15:33 UTC

README

提供迁移、种子、模型、事件、Artisan 命令和作业以支持通讯管理。

安装

将以下内容添加到您的 composer.json 中

  composer require sirs/communications
  php artisan vendor publish
  php artisan migrate

确保任何将成为消息通讯 接收者 的模型实现 Sirs\Communications\Contracts\Recipient 接口并使用 Sirs\Communications\Traits\RecipientTraits 特性。

确保任何将成为消息通讯 发送者 的模型实现 Sirs\Communications\Contracts\Sender 接口并使用 Sirs\Communications\Traits\SenderTraits 特性。

此软件包不包括用户界面,由用户负责。

注意:版本 4.0.0 需要 Laravel 5.5 或更高版本。如果您使用的是旧版本,您需要在 config/app.php 中包含 Sirs\Communications\CommunicationsServiceProvider

配置

  • recipientTypes - 将成为接收者的模型的全限定类名数组
  • senderTypes - 将成为发送者的模型的全限定类名数组
  • routeGroupSettings - 应用于通讯路由组的数组。例如:['prefix'=>'api', 'middleware' => 'auth']
  • global_scopes - 应用于 CommLogs 查询的全局作用域
  • addressTypes - 代表物理地址的 ChannelTypes 的 ID
  • channel_types - 定义要种入数据库的 ChannelTypes 的数组,格式为 ['slug' => 1],其中 1 是 ID。
  • statuses - 定义要种入数据库的 CommunicationStatuses 的数组,格式为 ['slug' => 1],其中 1 是 ID。
  • reasons - 定义要种入数据库的 CommunicationReasons 的数组,格式为 ['slug' => 1],其中 1 是 ID。

包含内容

  • 表的迁移
    • channel_types
    • channels
    • communication_reasons
    • communication_statuses
    • communication_logs
  • 种子(包括常用数据)
    • ChannelType
    • CommuncationReason
    • CommunicationStatus
  • 模型
    • Channel
    • ChannelType
    • CommLog
    • CommunicationReason
    • CommunicationStatus
  • 特性
    • RecipientTraits
    • SenderTraits
  • REST API CRUD 控制器
    • 通讯日志
    • channel_types
    • channels
    • 通讯状态
    • 通讯原因

Channels

渠道是一个联系信息项,例如电子邮件地址、电话或邮寄地址。渠道有一个类型(通常渠道类型包括电话、电子邮件、邮寄地址和住宅地址)。渠道的地址属性包含渠道的实际“位置”。例如,电话渠道的地址属性将包含 '919-123-1234'。邮寄、住宅和其他物理地址应编码为 json(例如 {"street1":"123 Home St","street2":null,"city":"Town","state":"NC","zip":12345}

我应该联系谁?

  • TJ Ward - jward3@email.unc.edu
  • Josh Knop - jknop@unc.edu