Putting the LIVE in Laravel LIVEwire

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ก.ย. 2024

ความคิดเห็น • 34

  • @rodrigozamudio-ub5rq
    @rodrigozamudio-ub5rq 29 วันที่ผ่านมา +2

    I love all your content, Josh. As a PHP and Laravel developer, I really enjoy every one of your videos.

    • @joshcirre
      @joshcirre  29 วันที่ผ่านมา

      Thank you so much for the encouragement. I appreciate it. ☺️

  • @harris_rafto
    @harris_rafto 28 วันที่ผ่านมา

    Thank you for the shoutout Josh 🙏
    wire:poll is a great tool in our belt and could be really beneficial in some use cases 😊

  • @windows07
    @windows07 29 วันที่ผ่านมา +1

    Really useful, sometimes people think they need websockets to make something “real time” but many use cases can be satisfied by polling

    • @Voidstroyer
      @Voidstroyer 29 วันที่ผ่านมา +1

      Polling isn't real time though. You do need websockets in order to make something real time. The question that needs to be asked is if the thing you are making needs to be real time or not. Polling kind of does an automatic partial page reload at a set interval.
      The problem that I see with the implementation in this video is that polling will hit the database each time and it will effectively reload all data (even data that hasn't actually changed). I might be completely wrong though since I have never used livewire. On the other hand if you use the pubsub architecture then only when data has actually changed will data be sent over the wire, and only the data that has changed will be sent. All other data is still the same so it does not need to be reloaded.

    • @joshcirre
      @joshcirre  29 วันที่ผ่านมา +1

      You're correct Voidstroyer. This probably isn't the most efficient, but CAN be made efficient with Livewire.
      Essentially with Livewire polling you can tell the Poll to run a method on your server to get updated information.
      You could then have a query that only grabs the updated information and refreshes the component in that sense.
      But, for simple text base information and with a database like SQLite, the stress isn't that significant even if updating the entire page/component.

    • @Voidstroyer
      @Voidstroyer 29 วันที่ผ่านมา

      @@joshcirre I understand that. I come from the Phoenix Liveview world so this isn't an issue for me. Optomization is always tricky. I like it when the framework minimizes the stuff I need to optomize for manually.

  • @theneverything
    @theneverything 27 วันที่ผ่านมา

    Very cool video and great refresher. I'm going to switch most the polling in my apps to websockets, but I did a lot of conditional polling. Let's say a user interacts with a button, which triggers background jobs, the method turns on polling for the given visible page and with the result coming in after a while, turns the polling off again.

    • @joshcirre
      @joshcirre  27 วันที่ผ่านมา

      Ooo. That’s a great video idea. Conditional polling. I’d love to hear how you did that.
      That might be a fantastic Livewire PR too. 👀

    • @theneverything
      @theneverything 27 วันที่ผ่านมา

      @@joshcirre hmm not sure it’s PR-worthy, but will look up the code I used and get back to you.

  • @Studywise_io
    @Studywise_io 29 วันที่ผ่านมา +1

    Josh you are being a nice help with those tips on laravel 🙏
    Can you give me advice on
    How can i make something like zoom video conference with laravel. Is there a way without pusher ?

    • @joshcirre
      @joshcirre  29 วันที่ผ่านมา

      Unfortunately, that's best with real time updates like Pusher or Laravel Reverb.
      You could also use a specific service for that though too. :)

  • @DanielFeldbrugge
    @DanielFeldbrugge 29 วันที่ผ่านมา

    I was building on the concept of setting livewire update through Laravel Reverb / websockets, this would make apps more reactive than ever.

    • @joshcirre
      @joshcirre  27 วันที่ผ่านมา

      I did a video using Livewire with Reverb on the official Laravel channel. Check it out when you get the chance!

  • @Swiss187
    @Swiss187 28 วันที่ผ่านมา

    Hey Josh, I love your videos. Thank you so much. Can you please explain what is the difference between this and laravel reverb?

    • @joshcirre
      @joshcirre  27 วันที่ผ่านมา

      This would just be talking and pinging the server every few seconds to get a response. Reverb is a long running websocket connection. Rather Reverb is the server dispatching and listening to those events.

    • @Swiss187
      @Swiss187 27 วันที่ผ่านมา

      @@joshcirre If im using sushi to call an external api for dashboard data, would you recommend reverb or using this method with livewire?

  • @berthojoris
    @berthojoris 29 วันที่ผ่านมา

    Thanks josh..Please share about livewire always ✨️

    • @joshcirre
      @joshcirre  27 วันที่ผ่านมา

      Will do! 🫡

  • @pratikbhujel
    @pratikbhujel 29 วันที่ผ่านมา

    Can you build video calling screen sharing with Livewire

  • @BrunoBernard-kn6vt
    @BrunoBernard-kn6vt 29 วันที่ผ่านมา

    Hey, amazing video! i wonder how do you add those glossy border around your windows do you use screen studio?

    • @joshcirre
      @joshcirre  27 วันที่ผ่านมา

      This is all done in OBS actually before recording. I’ll have to make a video about it all. ☺️

  • @dion3109
    @dion3109 29 วันที่ผ่านมา

    Hey Josh! I was wondering what your keyboard is called and de switches? 😆

    • @joshcirre
      @joshcirre  27 วันที่ผ่านมา

      This is actually a keyboard switch “sound” on the Mac. It’s called Klack app. ☺️

    • @dion3109
      @dion3109 26 วันที่ผ่านมา

      Ahh amazing!

  • @Z4KIUS
    @Z4KIUS 29 วันที่ผ่านมา

    but the browser throttles timers on background tabs so that's not gonna work that smoothly anyway

    • @joshcirre
      @joshcirre  29 วันที่ผ่านมา

      Good point. But nice to have just in case you do need it not throttled by the standard 95% that Livewire does too. ☺️

    • @Z4KIUS
      @Z4KIUS 29 วันที่ผ่านมา

      @@joshcirre yeah, it most likely will load the data as soon as you activate the tab this way
      but also makes it redundant to have that throttle built in into livewire

  • @njugunamwangi7023
    @njugunamwangi7023 28 วันที่ผ่านมา

    Just noticed you moved to functional API

    • @joshcirre
      @joshcirre  27 วันที่ผ่านมา +1

      I’ve been trying it out more!

    • @njugunamwangi7023
      @njugunamwangi7023 27 วันที่ผ่านมา

      @@joshcirre Awesome!

  • @yungifez
    @yungifez 29 วันที่ผ่านมา +1

    Wait till he finds out how easy websockets are in laravel and livewire 😂😂

    • @joshcirre
      @joshcirre  29 วันที่ผ่านมา

      Check the Laravel channel! I have a video on using Reverb with Livewire. 😁😏

    • @yungifez
      @yungifez 29 วันที่ผ่านมา

      @joshcirre oh I know you definitely know about websockwts
      I'm just teasing