trvmsg / messenger
Simple user messaging tool for Laravel
Requires
- php: >=5.4.0
- illuminate/config: ~5.0
- illuminate/database: ~5.0
- illuminate/support: ~5.0
- nesbot/carbon: ~1.0
Requires (Dev)
- adamwathan/faktory: 0.3.*
- friendsofphp/php-cs-fixer: ^1.11
- orchestra/testbench: ~3.0
- phpunit/phpunit: 4.*|5.*
- dev-master
- v2.x-dev
- 2.14.5
- 2.14.4
- 2.14.3
- 2.14.2
- 2.14.1
- 2.14
- 2.13.3
- 2.13.2
- 2.13.1
- 2.13
- 2.12
- 2.11
- 2.10
- 2.9.1
- 2.9
- 2.8.2
- 2.8.1
- 2.8
- 2.7.1
- 2.7
- 2.6
- 2.5.1
- 2.5
- 2.4
- 2.3
- 2.2.1
- 2.2
- 2.1
- 2.0
- v1.x-dev
- 1.8.2
- 1.8.1
- 1.8
- 1.7.1
- 1.7
- 1.6
- 1.5
- 1.4
- 1.3
- 1.2.1
- 1.2
- 1.1
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0
- dev-bug/#209-between-scope
- dev-bug/+209-between-scope
This package is not auto-updated.
Last update: 2024-11-01 21:02:17 UTC
README
Features
- Multiple conversations per user
- Optionally loop in additional users with each new message
- View the last message for each thread available
- Returns either all messages in the system, all messages associated to the user, or all message associated to the user with new/unread messages
- Return the users unread message count easily
- Very flexible usage so you can implement your own acess control
Common uses
- Open threads (everyone can see everything)
- Group messaging (only participants can see their threads)
- One to one messaging (private or direct thread)
Installation (Laravel 5.x)
In composer.json:
"require": {
"trvmsg/messenger": "~2.0"
}
Run:
composer update
Add the service provider to config/app.php
under providers
:
'providers' => [
Trvmsg\Messenger\MessengerServiceProvider::class,
]
Publish Assets
php artisan vendor:publish --provider="Trvmsg\Messenger\MessengerServiceProvider" --tag="config"
Update config file to reference your User Model:
config/messenger.php
Create a users
table if you do not have one already. If you need one, simply use this example as a starting point, then migrate.
Migrate your database:
php artisan migrate
Add the trait to your user model:
use Trvmsg\Messenger\Traits\Messagable;
class User extends Model {
use Messagable;
}
Examples
Note: These examples use the laravelcollective/html package that is no longer included in Laravel 5 out of the box. Make sure you require this dependency in your composer.json
file if you intend to use the example files.
Example Projects
Security
If you discover any security related issues, please email Chris Gmyr instead of using the issue tracker.
Credits
Special Thanks
This package used AndreasHeiberg/laravel-messenger as a starting point.