faden / faden-message-event
dev-master
2020-05-07 10:26 UTC
Requires
- alive2212/laravel-mobile-passport: ^3.0
- fideloper/proxy: ^4.2
- fruitcake/laravel-cors: ^1.0
- guzzlehttp/guzzle: ^6.3
- laravel/framework: ^7.0
- laravel/tinker: ^2.0
- laravel/ui: ^2.0
Requires (Dev)
- mockery/mockery: ^1.1
- orchestra/testbench: ~3|~4
- phpunit/phpunit: ^8.0
- sempro/phpunit-pretty-print: ^1.0
This package is auto-updated.
Last update: 2025-03-07 20:57:38 UTC
README
This is where your description should go. Take a look at contributing.md to see a to do list.
Installation
Via Composer
$ composer require faden/fadenmessagemodule
Usage
Add following code into User.php :
protected $dispatchesEvents = [ 'saved'=> \Faden\FadenMessageModule\Events\FadenUserAddedEvent::class, ]; public function messages() { return $this->belongsToMany( \Faden\FadenMessageModule\FadenMessage::class, 'faden_message_user' , 'user_id', "message_id"); }
Setup .env Mail section like:
MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=your@address.com MAIL_PASSWORD=***** MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=your@address.com MAIL_FROM_NAME= Name
Migrate
php artisan migrate
create FadenMessageType then FadenMessage model to fire event
$messageType->message()->save($message);
Change log
Please see the changelog for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email ali.salimiansas2@gmail.com instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.