Laravel: 3 Ways to Send a Welcome Email (Controller vs Observer vs Events)

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

КОМЕНТАРІ • 57

  • @AbrarAhmad-mz8vl
    @AbrarAhmad-mz8vl 3 роки тому +17

    You made good decision to keep the original video with errors. It is really great learning to see how senior developer solves an error.

  • @caweren222
    @caweren222 3 роки тому +6

    Around 3:40 you remove the last letter and retype it to make PHPStorm autocomplete, you can do that by simply putting your cursor somewhere inside the word and pressing alt+enter.

  • @TheAikinsGuy
    @TheAikinsGuy 3 роки тому +3

    You make programming look sooo easy. Thank you 🙌

  • @ndeblauw
    @ndeblauw 3 роки тому +9

    Good one. Only missed a remark about "sending e-mails should be done as much as possible through a queue, for better UX (speed)"

    • @PovilasKorop
      @PovilasKorop 3 роки тому +3

      Yeah, good catch, I think it's kind of a well-known thing, so I didn't plan to mention it here or set up a queue driver during this video.

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

    Thanks for Sharing Knowledge. You previous video regarding this topic 'Observers VS. Events Listeners" was worth watching too. Respect from Pakistan.

  • @SilVer-hu2ps
    @SilVer-hu2ps 3 роки тому

    Now I know where to configure when I try sending otp. Got the sms gateway already but I'm not working on it yet. Thanks. First time I've heard observers.

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

    very educative indeed. Been testing the sending emails using google mail server the emails end in the spam folder. How can we overcome this?

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

    Highly simplified🥂

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

    Such an amazing video to learn this concept. Thanks for this.

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

    Thank you very much , great tutorial

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

    Hi Thanks for video I'm your fan, one question : Is any performance will be better between those method ? and might be like other complicated notification: like in job search website make a candidate send CV notification etc show used controller directly ? cause as I think observer is more general action ? tks

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

    what is the difference on the performance basis like event as search or make a request efficiently between multiple users and also by using service container

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

    Queued up the events makes registration faster.

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

    thanks a lot

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

    Thank you for that great video!

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

    Thank you for being around to show us all of this wish if you have a full free course for people who like welling to learn web development using laravel and can't afford a high informative qoualtiy content as you do in your 10 minutes vedios.
    Anyway really thank you and wish to support you more than a subscribe and like.

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

    What part of code calls the “something” function in login controller?

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

    yes

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

    Thank you

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

    very very useful.......Thank you :)

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

    any tutorial how to read emails form dashboard for example Mailbox

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

    Sir do you have video about broadcat in laravel?

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

      Laracasts has a good video on push notification on a broadcast message. It isn't a hard thing to figure out from the documentation either. The choice you have to make is if you're going to run a service like laravel-echo or pass it off to a third party.

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

    I am familiar with jobs and queues in laravel and also how to run queue workers in dev env. But recently I encounter an issue while running queue workers in test env. the thing I did on test env is to set a cronjob in crontab that runs every minute to see if there is a new user registered etc then send an email to that user. This thing exhaust server's ram and due to this issue server was not responding. and when I remove cronjob from crontab and restart my server then my application was running fine. My question is how to run queue jobs in test or production env more effectively.

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

      It depends a lot on your server configuration, the queue driver you use, how you call the queues, etc. With a huge amount of variables, I can't shoot a "simple" video explaining all those different parts.

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

      I can recommend this recently released book: learn-laravel-queues.com/

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

      @@PovilasKorop Thank you. will definitely check the book.

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

    Is there a possibility that you have discount coupons for third world countries like Argentina? in laraveldaily

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

      I would like to do your courses but inflation does not allow me

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

      @@lorenipsum5831 I have a special -20% discount for my newsletter subscribers, so you could use that, coupon code LARAVELDAILY20

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

    laravel websockets simple chat example ? please ?¿

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

      My colleague wrote a tutorial: modestasv.com/chat-with-laravel-pusher-and-socket-io-at-your-command/

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

    Do you know how to get rid of the "Regard's" word , i exported the mail vendor folder and cant find the word or transalation, nither on the html or the text folders, is there something im missing?

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

      i think it has to do with this line of code ->{{-- Body --}} {{ $slot }} that embeds it but i'm not sure how to edit inside it, i just know that if i comment that line my that word is gone as long with the entire message body.

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

    Can I put event inside the observer?

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

    How can I send a welcome message to users email not to mailtrap ?
    What should I do to do that ?

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

      laraveldaily.com/post/how-to-send-email-from-laravel-and-why-we-need-3rd-party-providers-for-it my old article should give you an idea

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

    Yeeeeeeeeet

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

    how can i generate QR code and send it in email

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

      QR code generation would be library (like github.com/endroid/qr-code) or API (developers.google.com/chart/infographics/docs/qr_codes -- deprecated). Sending it in an email would just be attaching the file or writing an img tag. It shouldn't be hard for you to figure out.
      The question, however, is WHY? QR code in an email shows up on the screen of the device, the camaera to read the QR code is at the back of the device. QR codes, in most instances, kill kittens. The few times they don't would make sense is tickets for an event where the ushers scan the ticket, or coupons for use at a brick and mortar store -- outside of things like that, you probably don't really want to email people QR codes.

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

    Any idea how to send HTML email via Mail class without having a view template. I am trying
    Mail::html('This html message will be fetched from database', function ($message) {
    $message->to('fakeemail@fake.com');
    $message->from(env('APP_EMAIL'), 'Website Name');
    $message->subject("Email Subject Here");
    });
    This code throws this error "Address in mailbox given [] does not comply with RFC 2822, 3.6.2.".
    Also, I am using this code in the listener. Thank you in advance.

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

      Why you don't want to create a very simple view template? Follow all the docs here: laravel.com/docs/8.x/mail
      If you are trying to do something which is not in the official docs, of course, it may not work. I recommend sticking with the official examples.

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

      @@PovilasKorop The reason is that my content is in the database so it feels like overhead if create a template. It just a send HTML content no further customization needed that's why.

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

      @@tousifali1118 Understood. I've never done it myself, after quick googling found this article, syntax seems similar to yours: mauricius.dev/send-email-in-laravel-without-using-mailables/
      So maybe indeed it's an email? Have you tried chaning fakeemail@fake.com to a real email address?

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

    make notification via telegram pliiss,,

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

      I don't use Telegram myself so can't make any tutorial on it.

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

      @@PovilasKorop is there any other ways to support that, or maybe i can sent you bot key for demo purpose

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

      @@yuliarahma1300 Sorry I'm not going to learn how Telegram works and then build something around it. I have other list of topics.

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

      @@PovilasKorop sad, but its okay, i'll keep following you on youtube, thanks for always sharing

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

    Some of this code will return fatal errors in Laravel 8. How can UA-camrs expect their channel to grow when they're setting their audience up for failure?

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

      Should I re-shoot all the 500+ videos every time for new Laravel versions?

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

      @@LaravelDaily I'm sure you've seen videos that say "Updated for version X.x". Those videos usually get a lot of views, because not everyone can keep up with the documentation. Actually, sometimes you even have to edit one small portion of the vid, or edit a comment on a corner of the screen. Yet you had to reply with sarcasm.

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

    Thank you