Closed eduardonwa closed 3 years ago
Why was the Dispatch trait wasn't included in the CreatedComment? Can I use it? Wouldn't want to break anything.
See my comment in #137.
TLDR version. You need to create a listener in your app and in EventServiceProvider map the event CommentCreated to your listener.
Like this:
protected $listen = [
Registered::class => [
SendEmailVerificationNotification::class,
],
\Laravelista\Comments\Events\CommentCreated::class => [
SendEmailNewComment::class,
],
];
?
That should do it.
If I want to get an email notification whenever a post gets a new comment should I include the Listener in the vendors/laravelista/comments/ folder, or could I make it inside the App folder and create the listener within the app folder? If you can in fact create the listener right in the app, how should I ask for the CommentCreated.php class event?