From the course: Extending Laravel with First Party Packages

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Listening to the event

Listening to the event

- [Instructor] Alright so it's time to go ahead and finish up this section by putting all of the pieces together. So this should be a lot of fun. We are going to start by listening to the event, we're gonna learn how to trigger the event, and how to prevent duplication in the DOM. So wrapping up a lot of portions in this video. So we're gonna start off by listening to the event in our channel and we'll show you guys how to do that and how we can set all the users up to listen to the event. Then we're going to update the DOM in order to display a new event or a new comment to the users. We'll make sure to prevent duplication in the DOM, and then I also wanna show you how you can customize the payload for security reasons so that we only pass what's absolutely important for our request. Alright so here we are back inside of our new comment. And this is where you're kind of setting everything up. At this point basically everything will work. Now the one thing I wanna mention is that as…

Contents