Real-Time Laravel with Reverb: Example For Beginners

Поделиться
HTML-код
  • Опубликовано: 21 апр 2024
  • Presenting a new course with Reverb real-life examples!
    Link to the course: laraveldaily.com/course/larav...
    - - - - -
    Support the channel by checking out my products:
    - My Laravel courses: laraveldaily.com/courses
    - Filament examples: filamentexamples.com
    - Livewire Kit Components: livewirekit.com
    - - - - -
    Other places to follow:
    - My weekly Laravel newsletter: us11.campaign-archive.com/hom...
    - My personal Twitter: / povilaskorop
  • ХоббиХобби

Комментарии • 51

  • @mohammadnaim9226
    @mohammadnaim9226 Месяц назад +3

    You cover the main points in a short time and that's why your content is so good. And your tutorials are very informative. Proceed like this

  • @TheCodeholic
    @TheCodeholic 2 месяца назад +5

    Concise and on point explanation! 👍

  • @aleismasanchez
    @aleismasanchez 2 месяца назад

    Good! I was waiting your videos about Reverb.

  • @rikvandervaart2601
    @rikvandervaart2601 2 месяца назад

    Look really nice. Thanks for the vid Povilas. Just have to upgrade to 11 first in coming months to start experiementing with Reverb.

  • @PhoneMyatKyaw-mi8yz
    @PhoneMyatKyaw-mi8yz 2 месяца назад

    I am now working on chat application and this is a lot more easy to set up for real-time application.

  • @ilyasmohetna3648
    @ilyasmohetna3648 2 месяца назад

    This is amazing thank you !

  • @user-vi2fp6dl7b
    @user-vi2fp6dl7b 2 месяца назад

    Good job! Thank you!

  • @AndyTalbot
    @AndyTalbot 2 месяца назад

    Been trying it out and it's great, though I did have a bit of a headache doing private channels with my SPA using sanctum.

  • @robertkwesiamoah
    @robertkwesiamoah 2 месяца назад

    Ive been able to get it working on my ubuntu server now. Nice experience.

  • @Sebz9590
    @Sebz9590 2 месяца назад +1

    I was waiting for something like this for so long. Currently i have a project to handle the scores in competition, spectators see the results but every 5 seconds i have to refresh the page so spectators could see the new results. With this tool, spectators will be able to see the results in real time, it will be very practical instead of doing that refresh on the page

    • @LaravelDaily
      @LaravelDaily  2 месяца назад +1

      Very good practical example, yes!

  • @KYOTF67
    @KYOTF67 2 месяца назад

    Very Nice,Sir

  • @broouklynco.tutorials5606
    @broouklynco.tutorials5606 2 месяца назад +4

    So, this means that Laravel Reverb is completely free and we just should install it and work with it? Correct me if I'm wrong.

  • @sandipdas4765
    @sandipdas4765 2 месяца назад

    Cpanel php artisan queue:work working but how to set when press on terminal php artisan queue:listen --tries=0 pls help when i am off. How can i run the job table when i am off. Or close the cpanel terminal

  • @ammarabdulaziz1014
    @ammarabdulaziz1014 2 месяца назад

    May I know how many web socket connections can be handled at a time? For instance, suppose we have thousands of users connected through web sockets at time, will effect the performance?

    • @LaravelDaily
      @LaravelDaily  2 месяца назад +1

      To be honest, I haven't tried with thousands, but yes it will probably addect the performance.

    • @modestasmv
      @modestasmv 2 месяца назад +1

      This server can auto-scale as written in the documentation. You might, of course, encounter challenges, but it should be fine.

  • @sergioriosg
    @sergioriosg 2 месяца назад

    Can I create a laravel 11 project with reverb to use it as pusher for several others laravel projects or I need to install it in every project? What is a a better option?

    • @modestasmv
      @modestasmv 2 месяца назад

      We are not sure about the "receiving" part of the application. But it should allow you to push to reverb on one instance as long as the keys are the same (and the whole configuration).
      But can you expand on this a bit more of what you want to do? Thanks!

    • @sergioriosg
      @sergioriosg 2 месяца назад

      @@modestasmv Currently, we have three different platforms created with Laravel, and all three use real-time notifications. So, my idea was to create a fourth Laravel 11 project solely to install Reverb and use it similarly to the Pusher service, where I connect my other three platforms to this fourth one with Reverb. This would allow us to reuse this project and avoid having to install Reverb on each of the other projects, which, by the way, are on Laravel 10.

    • @modestasmv
      @modestasmv 2 месяца назад

      @@sergioriosg Hmm, in theory - that should work. I'm not 100% certain tho, as you might encounter issues :)

  • @robertkwesiamoah
    @robertkwesiamoah 2 месяца назад +2

    I've been able to use it locally... But struggling to set it up on an Ubuntu live server. Anyone with some ideas or resources to help?

    • @omaririskic98
      @omaririskic98 2 месяца назад +2

      You would have to create new supervisor worker. This worker would have a command reverb:start.
      RUclips apparently does not allow to post links in comments, so I can't attach a specific article. Try to google Laravel supervisor and click on medium article.
      The worker code would look something like this:
      [program:laravel-reverb]
      process_name=%(program_name)s_%(process_num)02d
      command=php /path-to-your-laravel-app/artisan reverb:start
      autostart=true
      autorestart=true
      user=your-user
      numprocs=4
      redirect_stderr=true
      stdout_logfile=/var/log/laravel-reverb.log

    • @spicynoodle7419
      @spicynoodle7419 2 месяца назад +1

      Don't use the same domain/host for PUSHER in your .env file for both server and frontend.
      I think your frontend Echo instance may be trying to get events from localhost or something

    • @robertkwesiamoah
      @robertkwesiamoah 2 месяца назад

      @@spicynoodle7419 I resolved it. I used my domain as host and chose a port different ports for front and back. I created an nginx server config with SSL certificate to listen to the front and port and proxy_pass to reverb port

    • @robertkwesiamoah
      @robertkwesiamoah 2 месяца назад

      @@spicynoodle7419 I resolved it. I used my domain as host and chose a port different ports for front and back. I created an nginx server config with SSL certificate to listen to the front and port and proxy_pass to reverb port

  • @JouvaMoufette
    @JouvaMoufette 2 месяца назад

    How does this differ from the server side stuff for Laravel Echo?

    • @LaravelDaily
      @LaravelDaily  2 месяца назад

      What exactly do you mean by "server side stuff"?

    • @JouvaMoufette
      @JouvaMoufette 2 месяца назад +2

      @@LaravelDaily Oops, yeah I guess Echo really is just the Javascript framework part of things.
      I see now, this is just a first party socket server, as opposed to using pusher or soketi. Glad to see they have a first party solution now!

  • @philipjamesajagabos2519
    @philipjamesajagabos2519 2 месяца назад

    Any possibility of using Reverb with livewire. Instead of writing the javascript, livewire component listens for the server event and update the component ?

    • @LaravelDaily
      @LaravelDaily  2 месяца назад

      I haven't seen this implementation. You basically then need to rewrite your own Laravel Echo with Livewire.

    • @philipjamesajagabos2519
      @philipjamesajagabos2519 2 месяца назад

      @@LaravelDaily Thanks and thanks for your daily tips. 🫡

  • @pauloclara4764
    @pauloclara4764 2 месяца назад

    Is possible to update laravel 10 to 11 in a filament project?

  • @HieuNguyen-pm9uf
    @HieuNguyen-pm9uf 2 месяца назад

    So I can use this in real-time chat right, sir ? Cause now I have a problem that, the chat can't reload in the group chat you know. The first person can but the second have to refresh the page to view the chat .
    p/s: I using dispatch and events using livewire now but seem like it just doesn't work

    • @LaravelDaily
      @LaravelDaily  2 месяца назад

      I haven't seen your code so can't tell you if reverb would solve your problem. But yes you can use reverb for live chat, with Laravel Echo on the frontend with JavaScript. This is one of our examples in the course.

    • @HieuNguyen-pm9uf
      @HieuNguyen-pm9uf 2 месяца назад

      @@LaravelDaily thank you sir

  • @user-yq5tw7iv2x
    @user-yq5tw7iv2x 2 месяца назад

    3:26 Does Reverb work with Laravel 10?

    • @lukasneuschl
      @lukasneuschl 2 месяца назад

      Laravel Reverb requires PHP 8.2+ and Laravel 10.47+.

  • @romanboyko3909
    @romanboyko3909 2 месяца назад

    wasn't able to use Reverb as standalone websocket server, is it possible?

    • @LaravelDaily
      @LaravelDaily  2 месяца назад

      Reading on the official page: "Reverb is a first-party WebSocket server..."
      So it IS a websocket server, what do you mean?

    • @romanboyko3909
      @romanboyko3909 2 месяца назад

      ​@@LaravelDaily Right now I have project with laravel-websocket package. All other projects use it as web socket server, so I don't have to install laravel-websocket for each project. Is that possible with Reverb?

    • @romanboyko3909
      @romanboyko3909 2 месяца назад

      "Typically, Reverb provides a WebSocket server for the application in which it is installed. However, it is possible to serve more than one application using a single Reverb installation." documentation says.

    • @LaravelDaily
      @LaravelDaily  2 месяца назад

      Not sure, I haven't tried it this way. You need to test it out yourself.

  • @user-kh6rp6yx1j
    @user-kh6rp6yx1j Месяц назад

    Hello