Closed edge104 closed 3 years ago
You can watch for event CommentCreated and then send an email or do whatever else you want.
I do not want to add that to the package atm because then I would have to maintain the email design and email class etc.
You can watch for event CommentCreated and then send an email or do whatever else you want.
I do not want to add that to the package atm because then I would have to maintain the email design and email class etc.
thanks. i'll try it
Could you make a tutorial about this? Thanks!
Could you make a tutorial about this? Thanks!
@eduardonwa Take a look at the Laravel documentation for events here: https://laravel.com/docs/8.x/events#introduction
It is very well explained in the docs but if that is not enough I am sure that laracasts has a few tutorials for listening to events.
does event CommentCreated refer to this file? vendor\laravelista\comments\src\Events\CommentCreated.php
but how could I customize this file? I mean how to copy this file to my project directory to modify
or should I copy CommentController.php in vendor to my project directory
then change controller file path in config/comments.php
and I add mail::send() action to CommentController.php?
@edge104 You should add a listener to your project which will trigger when the event CommentCreated is dispatched. See the Laravel documentation for specifics.
This tool is very easy to use, super awesome!👍 It would be more complete if you can send a letter to notify when someone leaves a message :-)