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

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

КОМЕНТАРІ • 87

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

    LETS CONNECT THROUGH INSTAGRAM.
    instagram.com/codewithdary

  • @LEXUANPHAT
    @LEXUANPHAT 2 роки тому +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.

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

      Hi Le Xuan, self-study is the best ;)

  • @alnahian2003
    @alnahian2003 2 роки тому +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  2 роки тому

      Love to hear that, thank you Al Nahian!

  • @abdulrafay1509
    @abdulrafay1509 3 роки тому +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

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

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

    Yeah I like this kind of content. Educational and simple

  • @broouklynco.tutorials5606
    @broouklynco.tutorials5606 2 роки тому +1

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

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

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

  •  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

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

    Very clear exlanation. Nice

  • @lubaron-q9m
    @lubaron-q9m 2 місяці тому

    Thank you Dary.

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

    amazing Dary

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

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

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

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

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

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

    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?

  • @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 ✅

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

    Amazing content. Hats of to you Dary

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

    GREAT VIDEO! thank you so much Code With Dary.

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

    Thank you!

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

    great content!!!

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

    is that observer design pattern, basically?

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

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

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

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

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

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

    Thank. keep it coming!!

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

    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؟

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

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

    Keep it up Bro ❤

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

    Is "event" async call like queue?

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

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

  • @timothybeldeniza2548
    @timothybeldeniza2548 3 роки тому +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  3 роки тому

      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 3 роки тому

      @@codewithdary Thank you so much !

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

      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

  • @TheWaqaspuri
    @TheWaqaspuri 6 місяців тому

    so lovely

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

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

    very clear

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

    Thanks

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

    amazing

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

    Nice bro

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

    🤝👍

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

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

    ✨✨✨✨

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

    💃

  • @augischadiegils.5109
    @augischadiegils.5109 2 роки тому

    nicee

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

    Not working

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

      It should be :)

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

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

  • @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? :)