It was super exciting to see how the event and listener works in laravel. I was kinda overwhelmed while reading the docs, but now the basics of events & listener is clear to me! WohHoo! Thanks Dary
Hi, I'm Vietnamese, I'm starting to self-study Laravel and I found your UA-cam. I found your instructions very detailed, thank you for the lesson is very useful. Because I'm not good at English, I used google translate to support. If the wording is not appropriate, please forgive.
Thanks for the tutorial. It's very clear! My only question is when should we trigger the e-mail sending through the event instead of doing it directly within the controller?
I guess, it is better to send an email via event because this kind of task may require some time to process. I mean, saving data to DB via listener - is kinda weird, there is a repository for that, but handling logs and email seems appropriate
Think about emailing a user when they subscribe to your newsletter of when they buy a product. You can fire an event to send them either the confirmation or just a thank you message. Or even a better example: send a discount code to customers that buy products in let's say 5 days from the purchase!
@@codewithdary Hi, How can we pass more info into the Event. Like we want to show in the received email, the Name of Person, email address etc who has subscribed.
This is a nice video bro , in my opinion using events and listeners is more of a long process …. There are shorter ways to do it with the controller and optimize time ! What do you think? Nice video btw ✅
Hi , bro i have questions aut of topic . Can you make a video which is about working as a frelancer . As a laravel developer , i am student at the international education programme . In the field of computer science ... It would be better , i will wait .👍👍🙂
i am sending mails for multiple users using event listener but the problem is firstly my listener is executing and after that it is returrning me response so it is not helping me in any way ? any idea where i am doing wrong or any thing i am missing please help me ??
Can i use event to send notifications like user follow another user but not in email is there another way to make notification appear on user profile view؟
LETS CONNECT THROUGH INSTAGRAM.
instagram.com/codewithdary
It was super exciting to see how the event and listener works in laravel. I was kinda overwhelmed while reading the docs, but now the basics of events & listener is clear to me!
WohHoo! Thanks Dary
Love to hear that, thank you Al Nahian!
Hi,
I'm Vietnamese, I'm starting to self-study Laravel and I found your UA-cam. I found your instructions very detailed, thank you for the lesson is very useful.
Because I'm not good at English, I used google translate to support. If the wording is not appropriate, please forgive.
Hi Le Xuan, self-study is the best ;)
Nice vid bro!
No one, literally no one, not a single soul!
Backend devs: That's a pretty nice looking form field even though it's coming from me! :D
Hahahahahaa!
amazing Dary
Thank you Abdalla! :)
I like watching your tutorials. you are so intelligent.
You are too man! :) Thank you.
thank you Code with Dary, this your video was helpful
Love to help Emmanuel!
Thank you!
You're welcome!
Very clear exlanation. Nice
Thank you Reuben!
Yeah I like this kind of content. Educational and simple
Thank you so much :)
GREAT VIDEO! thank you so much Code With Dary.
You're so welcome!
Damn! It's awesome tutorial...I love it...thank you so much... 🙏
Thank you for watching! :)
Thanks for the tutorial. It's very clear! My only question is when should we trigger the e-mail sending through the event instead of doing it directly within the controller?
You should add it inside the handle() method of your Listener!
I guess, it is better to send an email via event because this kind of task may require some time to process. I mean, saving data to DB via listener - is kinda weird, there is a repository for that, but handling logs and email seems appropriate
The documentation really needs work with Observers, Events and Listeners
Definitely agree with you, especially because those topics are quite difficult as well.
Nice never heard about these terms, nice to see im gonna add this to my blog website also thanks to one of your video's! Thanks for sharing, Dary. 👌
My pleasure Angelino! Thanks for joining Patreon :)
Thank. keep it coming!!
Will do Rasheed!
Amazing content. Hats of to you Dary
Thank you buddy!
hey, love your vscode look, can you share your extensions and configuration? Thank you in advance!
Hi, here's a video where I setup VS code: ua-cam.com/video/KAUxgUvC514/v-deo.html
And I use Material Theme (I think palenight) for my theme :)
Keep it up Bro ❤
Thank you, I will bro!!
so lovely
Thanks Dary! Great video!! What other kind of things should be managed by Events & Listeners? It is like they do the job of the Controllers.
Think about emailing a user when they subscribe to your newsletter of when they buy a product. You can fire an event to send them either the confirmation or just a thank you message.
Or even a better example: send a discount code to customers that buy products in let's say 5 days from the purchase!
@@codewithdary Thanks for your response!!
@@codewithdary Hi, How can we pass more info into the Event. Like we want to show in the received email, the Name of Person, email address etc who has subscribed.
great content!!!
Thank you so much! :)
Thanks
Welcome!!
How can I attached their details like name in the sent email
Through the user object!
This is a nice video bro , in my opinion using events and listeners is more of a long process …. There are shorter ways to do it with the controller and optimize time ! What do you think? Nice video btw ✅
What of saving the data using controller class, and then using Laravel notification on the listener class? Make sense?
Dary, you mentioned (15:10) that you won't use Eloquent inside the handle() of the listener. Is there a reason why you preferred DB query over there?
Hi , bro i have questions aut of topic .
Can you make a video which is about working as a frelancer . As a laravel developer , i am student at the international education programme . In the field of computer science ... It would be better , i will wait .👍👍🙂
That sounds like a interesting video :)
i am sending mails for multiple users using event listener but the problem is firstly my listener is executing and after that it is returrning me response so it is not helping me in any way ? any idea where i am doing wrong or any thing i am missing please help me ??
is that observer design pattern, basically?
Very clear explanation, awesome !
Just one question, why store the data thru the event instead of controller ?
Same question here, as far as i understand "event" is sth that was done in past an is stored in som kind of DB
@@paweliszka44 it is just a example so you can store it in controller instead of listener
Can i use event to send notifications like user follow another user but not in email is there another way to make notification appear on user profile view؟
Is "event" async call like queue?
Hi, How can we pass more info into the Event. Like we want to show in the received email, the Name of Person, email address etc who has subscribed.
You should be passing them in the constructor, and when you call the Event from your Controller, you should be passing the variables as parameters :)
@@codewithdary Thank you so much !
Good day Dary, may i ask, how can i use Queues here in your Event and Listener, where do i put the dispatch method, in listener class? Thanks
very clear
Glad to hear that
Good work. What extension are you using for laravel in visual studio code?
Thank you. I recently created a video where I setup VSCode: ua-cam.com/video/KAUxgUvC514/v-deo.html&t
@@codewithdary Thanks. I shall watch it.
amazing
Thanks 😄
Nice bro
Thanks!!
🤝👍
👌🏽
Not working
It should be :)
@@codewithdary I forgot to include path in Eventserviceprovider. Working now. Thanks...
nicee
Thanks Augis!!
💃
👌
✨✨✨✨
:)
Jesus.... half of the tutorial was non event related
Am I the only one seeing timestamps in the video? :)