Events In Laravel | How To Use Events | Listeners In Laravel | How to add Newsletters

Поділитися
Вставка
  • Опубліковано 22 сер 2024

КОМЕНТАРІ • 88

  • @codewithdary
    @codewithdary  2 роки тому +2

    LETS CONNECT THROUGH INSTAGRAM.
    instagram.com/codewithdary

  • @alnahian2003
    @alnahian2003 Рік тому +2

    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

    • @codewithdary
      @codewithdary  Рік тому

      Love to hear that, thank you Al Nahian!

  • @LEXUANPHAT
    @LEXUANPHAT Рік тому +2

    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.

  • @abdulrafay1509
    @abdulrafay1509 2 роки тому +2

    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

  • @abdallakaram5376
    @abdallakaram5376 2 роки тому +1

    amazing Dary

  • @GoTechAcademy
    @GoTechAcademy 2 роки тому

    I like watching your tutorials. you are so intelligent.

  • @emmanuelboniface2660
    @emmanuelboniface2660 Рік тому +1

    thank you Code with Dary, this your video was helpful

  • @yakhyomus
    @yakhyomus 2 роки тому +1

    Thank you!

  • @vooDOO6625
    @vooDOO6625 2 роки тому

    Very clear exlanation. Nice

  • @muaf8374
    @muaf8374 2 роки тому

    Yeah I like this kind of content. Educational and simple

  • @user-gf3hf5ri8b
    @user-gf3hf5ri8b 2 роки тому +1

    GREAT VIDEO! thank you so much Code With Dary.

  • @TrikNgonlen
    @TrikNgonlen 3 роки тому +1

    Damn! It's awesome tutorial...I love it...thank you so much... 🙏

  •  3 роки тому +1

    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?

    • @codewithdary
      @codewithdary  3 роки тому

      You should add it inside the handle() method of your Listener!

    • @bewellegoist
      @bewellegoist 2 роки тому

      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

  • @fancyAlex1993
    @fancyAlex1993 Рік тому +1

    The documentation really needs work with Observers, Events and Listeners

    • @codewithdary
      @codewithdary  Рік тому

      Definitely agree with you, especially because those topics are quite difficult as well.

  • @MrSonicastra
    @MrSonicastra 3 роки тому +1

    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. 👌

    • @codewithdary
      @codewithdary  3 роки тому

      My pleasure Angelino! Thanks for joining Patreon :)

  • @Rasheedadedamola
    @Rasheedadedamola 3 роки тому +1

    Thank. keep it coming!!

  • @asim-gandu-phenchod
    @asim-gandu-phenchod 2 роки тому

    Amazing content. Hats of to you Dary

  • @broouklynco.tutorials5606
    @broouklynco.tutorials5606 Рік тому +1

    hey, love your vscode look, can you share your extensions and configuration? Thank you in advance!

    • @codewithdary
      @codewithdary  Рік тому

      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 :)

  • @sithumdasantha3147
    @sithumdasantha3147 3 роки тому +1

    Keep it up Bro ❤

  • @TheWaqaspuri
    @TheWaqaspuri 3 місяці тому

    so lovely

  • @hernanmartinezreumann3279
    @hernanmartinezreumann3279 3 роки тому +1

    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.

    • @codewithdary
      @codewithdary  3 роки тому +2

      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!

    • @hernanmartinezreumann3279
      @hernanmartinezreumann3279 3 роки тому

      @@codewithdary Thanks for your response!!

    • @piyushkumardongre5873
      @piyushkumardongre5873 3 роки тому

      @@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.

  • @vuviy1711
    @vuviy1711 2 роки тому +1

    great content!!!

  • @GergelyCsermely
    @GergelyCsermely 3 роки тому +1

    Thanks

  • @ifeanyinnaemego
    @ifeanyinnaemego Рік тому +1

    How can I attached their details like name in the sent email

  • @nicolegeorge8659
    @nicolegeorge8659 2 роки тому

    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 ✅

  • @ugochukwuekwueme575
    @ugochukwuekwueme575 2 роки тому

    What of saving the data using controller class, and then using Laravel notification on the listener class? Make sense?

  • @writingbig
    @writingbig Рік тому

    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?

  • @Ramziddin_Rustamovv
    @Ramziddin_Rustamovv 2 роки тому +1

    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 .👍👍🙂

    • @codewithdary
      @codewithdary  2 роки тому +2

      That sounds like a interesting video :)

  • @rohansinghrawat5676
    @rohansinghrawat5676 2 роки тому

    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 ??

  • @carlosf.2927
    @carlosf.2927 2 роки тому

    is that observer design pattern, basically?

  • @owfprem1754
    @owfprem1754 3 роки тому

    Very clear explanation, awesome !
    Just one question, why store the data thru the event instead of controller ?

    • @paweliszka44
      @paweliszka44 2 роки тому

      Same question here, as far as i understand "event" is sth that was done in past an is stored in som kind of DB

    • @rohansinghrawat5676
      @rohansinghrawat5676 2 роки тому

      @@paweliszka44 it is just a example so you can store it in controller instead of listener

  • @abdulsalamghadeer6023
    @abdulsalamghadeer6023 2 роки тому

    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؟

  • @timshen5250
    @timshen5250 Рік тому

    Is "event" async call like queue?

  • @timothybeldeniza2548
    @timothybeldeniza2548 2 роки тому +1

    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.

    • @codewithdary
      @codewithdary  2 роки тому

      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 :)

    • @timothybeldeniza2548
      @timothybeldeniza2548 2 роки тому

      @@codewithdary Thank you so much !

    • @timothybeldeniza2548
      @timothybeldeniza2548 2 роки тому

      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

  • @jseh_
    @jseh_ 3 роки тому

    very clear

  • @geoffrey6420
    @geoffrey6420 2 роки тому

    Good work. What extension are you using for laravel in visual studio code?

    • @codewithdary
      @codewithdary  2 роки тому +1

      Thank you. I recently created a video where I setup VSCode: ua-cam.com/video/KAUxgUvC514/v-deo.html&t

    • @geoffrey6420
      @geoffrey6420 2 роки тому

      @@codewithdary Thanks. I shall watch it.

  • @peterpardo4138
    @peterpardo4138 3 роки тому +1

    amazing

  • @lijinv674
    @lijinv674 3 роки тому

    Nice bro

  • @Ramziddin_Rustamovv
    @Ramziddin_Rustamovv 2 роки тому +1

    🤝👍

  • @vrj93
    @vrj93 2 роки тому +1

    Not working

    • @codewithdary
      @codewithdary  2 роки тому

      It should be :)

    • @vrj93
      @vrj93 2 роки тому +1

      @@codewithdary I forgot to include path in Eventserviceprovider. Working now. Thanks...

  • @augischadiegils.5109
    @augischadiegils.5109 Рік тому

    nicee

  • @shailu016hai6
    @shailu016hai6 3 роки тому +1

    💃

  • @fraazwas5915
    @fraazwas5915 3 роки тому +1

    ✨✨✨✨

  • @cesarperalta4959
    @cesarperalta4959 2 роки тому +1

    Jesus.... half of the tutorial was non event related

    • @codewithdary
      @codewithdary  2 роки тому

      Am I the only one seeing timestamps in the video? :)