sirs / communications
Laravel 5 communications package for SIRS
Requires
- php: ^8.1
- cviebrock/eloquent-sluggable: ^10.0
- laravel/framework: ^10.0
- league/fractal: ^0.20
- dev-master
- 10.1.0
- 10.0.x-dev
- 10.0.0
- 9.0.x-dev
- 9.0.2
- 9.0.1
- 9.0.0
- 4.0.x-dev
- 4.0.15
- 4.0.14
- 4.0.13
- 4.0.12
- 4.0.11
- 4.0.10
- 4.0.9
- 4.0.8
- 4.0.7
- 4.0.6
- 4.0.5
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.x-dev
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.0.x-dev
- 2.0.0
- 1.1.1
- 1.1.0
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2024-11-10 17:09:27 UTC
README
Provides migrations, seeds, models, events, artisan commands, and jobs to support communication management.
Installation
Add the following to your composer.json
composer require sirs/communications
php artisan vendor publish
php artisan migrate
Make sure any models that will be communication recipients of messages implement the Sirs\Communications\Contracts\Recipient
Interface and use the Sirs\Communications\Traits\RecipientTraits
trait.
Make sure any models that will be communication senders of messages implement the Sirs\Communications\Contracts\Sender
Interface and use the Sirs\Communications\Traits\SenderTraits
trait.
No user interface is included with in this package and is the responsibility of the consumer.
note: Version 4.0.0 requires laravel 5.5 or greater. If you are using an older version you will need to include Sirs\Communications\CommunicationsServiceProvider
in config/app.php.
Configuration
- recipientTypes - Array of fully qualified class names for models that will be recipients
- senderTypes - Array of fully qualified class names for models that will be senders
- routeGroupSettings - Array to be applied to communication route group. Example:
['prefix'=>'api', 'middleware' => 'auth']
- global_scopes - Global scope to be applied to CommLogs queries
- addressTypes - Ids of ChannelTypes that represent physical addresses
- channel_types - Array for defining ChannelTypes to be seeded into the database in the format
['slug' => 1]
where 1 is the id. - statuses - Array for defining CommunicationStatuses to be seeded into the database in the format
['slug' => 1]
where 1 is the id. - reasons - Array for defining CommunicationReasons to be seeded into the database in the format
['slug' => 1]
where 1 is the id.
What's included
- Migrations for tables
- channel_types
- channels
- communication_reasons
- communication_statuses
- communication_logs
- Seeds (including common data)
- ChannelType
- CommuncationReason
- CommunicationStatus
- Models
- Channel
- ChannelType
- CommLog
- CommunicationReason
- CommunicationStatus
- Traits
- RecipientTraits
- SenderTraits
- REST API CRUD Controllers for
- communication logs
- channel types
- channels
- communication statuses
- communication reasons
Channels
A channel is a contact info item such as an email address, phone, or mailing address. A channel has a type (typically channel types include phone, email, mailing address, and home address). The channel's address attribute holds the actual "location" of the channel. For example a phone channel's address attribute would have '919-123-1234'. Mailing, Home and other physical addresses should be encoded as json (i.e {"street1":"123 Home St","street2":null,"city":"Town","state":"NC","zip":12345}
)
Who do I talk to?
- TJ Ward - jward3@email.unc.edu
- Josh Knop - jknop@unc.edu