Download the PHP package sierratecnologia/transmissor without Composer
On this page you can find all versions of the php package sierratecnologia/transmissor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sierratecnologia/transmissor
More information about sierratecnologia/transmissor
Files in sierratecnologia/transmissor
Package transmissor
Short Description Simple user messaging and notifications tool for Laravel
License MIT
Homepage https://sierratecnologia.com/packages/transmissor/
Informations about the package transmissor
SierraTecnologia Transmissor
SierraTecnologia Transmissor transmissor services transmissor and providers for users required by various SierraTecnologia packages. Validator functionality, and basic controller included out-of-the-box.
Table of Contents
- Overview
- Features
- Requirements
- Installation
- Configuration
- Usage
- Notifications
- User Messaging
- Activity Logging
- Webhooks
- Facades
- API Reference
- Testing
- Changelog
- Support
- Contributing & Protocols
- Security Vulnerabilities
Overview
Transmissor is a comprehensive messaging and notification library for Laravel applications. It provides a unified interface for managing user notifications, internal messaging systems, activity logging, and webhook handling. The package integrates seamlessly with Laravel's notification system and extends it with additional features like threaded messaging, user activity tracking, and real-time notifications.
Features
- User Notifications System: Create, manage, and deliver notifications to users with support for multiple channels
- Internal Messaging: Complete threaded messaging system with support for groups, participants, and message history
- Activity Logging: Track user activities and system events with detailed request information
- Webhook Management: Handle incoming webhooks with support for various integrations
- Real-time Broadcasting: Built-in support for Laravel Broadcasting channels
- Flexible Policies: Includes authorization policies for threads, topics, and replies
- Multiple Database Support: Compatible with MySQL, PostgreSQL, SQLite, and SQL Server
- API Ready: Includes API controllers and resources for RESTful implementations
- Helper Functions: Convenient helper functions for quick access to features
- Cacheable Eloquent Models: Performance optimization through model caching
- Laravel Integration: Seamless integration with Laravel's service container, facades, and events
Requirements
- PHP 7.2 or higher (PHP 8.0+ supported)
- Laravel 5.5 or higher (Laravel 8.x supported)
- Dependencies:
sierratecnologia/muleta^0.4.0sierratecnologia/crypto^0.4.0sierratecnologia/integrations^0.4.0sierratecnologia/porteiro^0.4.0sierratecnologia/population^0.4.0sierratecnologia/locaravel^0.4.0sierratecnologia/telefonica^0.4.0
Installation
Install the package via Composer:
The package will automatically register its service provider thanks to Laravel's package auto-discovery.
Publish Configuration and Assets
Publish the configuration files:
Publish views (optional):
Publish translations (optional):
Run Migrations
The package includes migrations for notifications, messages, threads, and related tables:
Configuration
After publishing, you'll find the configuration file at config/sitec/transmissor.php. While the default configuration is empty (allowing you to use defaults), you can customize various aspects of the package.
Available Configuration Options
Usage
Notifications
The Transmissor package extends Laravel's notification system with additional features.
Creating Notifications
You can create notifications programmatically using the NotificationService:
Retrieving Notifications
Managing Notifications
Using the Notification Facade
User Messaging
Transmissor includes a complete messaging system based on threads and participants.
Models
- Thread: Represents a conversation
- Message: Individual messages within a thread
- Participant: Users participating in a thread
Creating a Message Thread
Using the Messagable Trait
Add the trait to your User model:
Now you can use messaging methods directly on user instances:
Retrieving Messages
Activity Logging
Track user activities and system events throughout your application.
Using the Activity Service
Using the Activity Helper
The package includes a convenient helper function:
Activity Middleware
Apply the activity middleware to routes for automatic logging:
What Gets Logged
Each activity record includes:
- User ID
- Description
- Request details (URL, method, query string, IP address, payload)
- Timestamp
Webhooks
Handle incoming webhooks from external services.
Webhook Controller
The package includes controllers for webhook handling:
Webhook Jobs
Process webhooks asynchronously with included job classes:
Creating Custom Webhook Handlers
Facades
The package provides convenient facades for quick access to services:
Transmissor Facade
Notifications Facade
Activity Facade
API Reference
NotificationService Methods
| Method | Parameters | Description | |
|---|---|---|---|
all() |
- | Get all notifications | |
paginated() |
- | Get paginated notifications | |
userBased($id) |
$id (int) |
Get all notifications for a user | |
userBasedPaginated($id) |
$id (int) |
Get paginated notifications for a user | |
search($input, $id) |
$input (string), $id (int |
null) | Search notifications |
notify($userId, $flag, $title, $details) |
$userId (int), $flag (string), $title (string), $details (string) |
Create and send a notification | |
create($input) |
$input (array) |
Create a notification | |
find($id) |
$id (int) |
Find notification by ID | |
findByUuid($uuid) |
$uuid (string) |
Find notification by UUID | |
update($id, $input) |
$id (int), $input (array) |
Update a notification | |
markAsRead($id) |
$id (int) |
Mark notification as read | |
destroy($id) |
$id (int) |
Delete a notification |
ActivityService Methods
| Method | Parameters | Description | |
|---|---|---|---|
getByUser($userId, $paginate) |
$userId (int), $paginate (int |
null) | Get activities for a user |
log($description) |
$description (string) |
Create an activity log entry |
Thread Model Methods
| Method | Parameters | Description |
|---|---|---|
getAllLatest() |
- | Get all threads ordered by latest activity |
forUser($userId) |
$userId (int) |
Get threads for a specific user |
addParticipant($userId) |
$userId (int) |
Add a participant to the thread |
addParticipants($userIds) |
$userIds (array) |
Add multiple participants |
removeParticipant($userId) |
$userId (int) |
Remove a participant |
markAsRead($userId) |
$userId (int) |
Mark thread as read for user |
Testing
The package includes comprehensive tests for all major features.
Running Tests
Test Structure
Changelog
Refer to the Changelog for a full history of the project.
Support
The following support channels are available at your fingertips:
- Chat on Slack
- Help on Email
- Follow on Twitter
Contributing & Protocols
Thank you for considering contributing to this project! The contribution guide can be found in CONTRIBUTING.md.
Bug reports, feature requests, and pull requests are very welcome.
- Versioning
- Pull Requests
- Coding Standards
- Feature Requests
- Git Flow
Security Vulnerabilities
If you discover a security vulnerability within this project, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.
About SierraTecnologia
SierraTecnologia is a software solutions startup, specialized in integrated enterprise solutions for SMEs established in Rio de Janeiro, Brazil since June 2008. We believe that our drive The Value, The Reach, and The Impact is what differentiates us and unleash the endless possibilities of our philosophy through the power of software. We like to call it Innovation At The Speed Of Life. That’s how we do our share of advancing humanity.
License
This is opensource package The MIT License (MIT).
(c) 2008-2020 SierraTecnologia, Permitimos a cópia sem restrições.
All versions of transmissor with dependencies
illuminate/config Version ^5.5|^6.0|^7.0|^8.0
illuminate/support Version ^5.5|^6.0|^7.0|^8.0
illuminate/database Version ^5.5|^6.0|^7.0|^8.0
sierratecnologia/muleta Version ^0.4.0
sierratecnologia/crypto Version ^0.4.0
sierratecnologia/integrations Version ^0.4.0
sierratecnologia/porteiro Version ^0.4.0
sierratecnologia/population Version ^0.4.0
sierratecnologia/locaravel Version ^0.4.0
sierratecnologia/telefonica Version ^0.4.0
ramsey/uuid Version >=3.8
guzzlehttp/guzzle Version ^6.0|^7.0|^8.0
cmgmyr/messenger Version dev-master