Laravel 11 WebSocket

Поделиться
HTML-код
  • Опубликовано: 5 янв 2025

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

  • @benabidayoussef9895
    @benabidayoussef9895 3 месяца назад

    Thank you so much bro, keep sharing with us advanced concepts in Laravel 11

    • @eraufi
      @eraufi  3 месяца назад

      Thank you, I will

  • @abdulsamad-he8vr
    @abdulsamad-he8vr 6 месяцев назад +2

    How can i do this over Api.

    • @eraufi
      @eraufi  6 месяцев назад

      for that you can view this video
      ruclips.net/video/0BI_01zg8ng/видео.html

  • @lazy_coding
    @lazy_coding 3 месяца назад +1

    Is there any laravel chat application tutorial that doens't use pusher?

    • @eraufi
      @eraufi  3 месяца назад

      yes there are a lot.
      you can built it also using laravel reverb and if you are using shared hosting where you don't have access to SSH you can use SSE to make a chat application
      here is demo
      ruclips.net/video/Dcnud0U5-6E/видео.htmlsi=E8jOtBwRxiMwpUfW
      and you can test it here
      stacktips.rf.gd/

    • @druganov962
      @druganov962 3 месяца назад

      You dont need pusher, i recommend using soketi or reverb if it works fine for u, why pay for something that you can host yourself for free..

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

    How to serve reverb for flutter via ngrok for local development without actual pusher account

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

      first of all you don't need a pusher account for laravel reverb it's fully free.
      and it dosen't matter what you use in front end either flutter, react or react native
      you can serve reverb using this command
      php artisan reverb:start

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

      @@eraufi but problem is how can i setup with ngrok
      Localhost is working fine
      But the same page with ngrok is not receiving any events.
      If ngrok url page is work then it will also work with flutter

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

      @@mohdsajidshaikh4291 sorry but I have never used ngrok and I don't have any experience with it.

  • @diptobiswas6511
    @diptobiswas6511 8 месяцев назад

    Uncaught TypeError: Cannot read properties of undefined (reading 'pirvate') . I changed milliseconds but it doesn't work for me 🤔

    • @eraufi
      @eraufi  8 месяцев назад

      in that case check your resources/js/app.js.
      check if it's loaded correctly if the echo.js is there

    • @diptobiswas6511
      @diptobiswas6511 8 месяцев назад +1

      @@eraufi Yeap it's working... thanks bro.

  • @JyothiPrakash-ql8np
    @JyothiPrakash-ql8np 7 месяцев назад

    How do you start the server in video 7.10? You are returning to your browser and it is supposed to automatically work, but it is not working. the error for me: The site can't be reached

    • @eraufi
      @eraufi  7 месяцев назад

      i am using Laragon. so i don't have to run the application using PHP artisan serve. if you check the URL in the browser it end with .test

  • @ShilpaPradeep-ss9hm
    @ShilpaPradeep-ss9hm 7 месяцев назад

    I have an issue of not receiving event in frontend. Do I need to do $this->broadcastVia('reverb') inside Event?

    • @eraufi
      @eraufi  7 месяцев назад

      what are you using in frontend?

    • @ShilpaPradeep-ss9hm
      @ShilpaPradeep-ss9hm 7 месяцев назад

      @@eraufi I'm using vue

    • @eraufi
      @eraufi  7 месяцев назад +1

      @@ShilpaPradeep-ss9hm in that case create a public channel first and test it. you can follow the steps in the video starting from 3:00 up to 9:00.
      if everything was working fine than create a private channel.

    • @ShilpaPradeep-ss9hm
      @ShilpaPradeep-ss9hm 7 месяцев назад

      @@eraufi Thanks you for your reply. I have one more doubt, do we need to create reverb account like how we did in pusher?

    • @eraufi
      @eraufi  7 месяцев назад

      @@ShilpaPradeep-ss9hm no. no need for creating any account

  • @NguyenMinhTriFPLHN-ox5rn
    @NguyenMinhTriFPLHN-ox5rn 3 месяца назад

    why can't i run php artisan install:broadcasting command

    • @eraufi
      @eraufi  3 месяца назад

      can you please give some more details. what error messages are you getting

  • @Daaboo
    @Daaboo 7 месяцев назад

    How to setup a private chat room with laravel api and vue frontend with Reverb?

    • @eraufi
      @eraufi  7 месяцев назад

      you can create a private channel for that and give it a name then assign the users.

  • @ankittiwari777
    @ankittiwari777 5 месяцев назад

    Hi, this video is very helpful for me but getting error when I am using https protocal, it is working fine on http server. Please help me on that.

    • @eraufi
      @eraufi  5 месяцев назад

      hi. thanks for the comment.
      could you please explain what error you are facing over HTTPS?

    • @ankittiwari777
      @ankittiwari777 5 месяцев назад

      @@eraufi Getting error "WebSocket is closed before the connection is established.", by selecting ws in network option in inspect.

    • @eraufi
      @eraufi  5 месяцев назад

      @@ankittiwari777 thanks for the replay. it's hard to know exactly what went wrong without seeing the actual code.
      but I found a github page with similar problem you can check that.
      github.com/laravel/reverb/issues/163
      but before that please give me some more information about your setup. so I can test it on my own PC.
      like: are you using HTTP and HTTPS on the same PC or HTTP in your local environment and HTTPS on server

    • @ankittiwari777
      @ankittiwari777 5 месяцев назад

      @@eraufi I am using subdomain like abc.xyz.rts. and ssl is also I have, but no problem when i am hitting with http, error comes with https.
      Need to know, if i have ssl certificate zip folder then in which files we will configure for these laravel reverb setup to run on https?

  • @reggienillas9617
    @reggienillas9617 7 месяцев назад

    I am new to laravel and broadcasting, i followed your video and applied it in my single page application that i just created, however, I am getting broadcasting/auth 403 forbidden error, and also i checked the laravel.log, i have Array to string conversion error on my Event.php file, i hope you can help me with this

    • @eraufi
      @eraufi  7 месяцев назад

      broadcasting/auth 403 forbidden. since you are making a SPA.I think you are using Vue or React and working with tokens. in that case, you are not sending the token. I found a StackOverflow question based on your question you can check that.
      stackoverflow.com/questions/41728930/laravel-broadcasting-auth-always-fails-with-403-error

    • @reggienillas9617
      @reggienillas9617 7 месяцев назад

      @@eraufi yes i am using vue js3 laravel 11 reverb. Thank you

  • @m7mmadomar
    @m7mmadomar 8 месяцев назад

    Thank you for this wonderful explanation. I have a question: When working on two separate projects like Laravel and Angular, do I need to make such configurations and code for each to work?? Please, if you have enough time, create a video on this matter because I couldn't find any explanation on it.
    Also, what is the difference with the library laravel-websockets?

    • @eraufi
      @eraufi  8 месяцев назад

      Yes, absolutely.
      laravel-websocket github repo has been archived. so we need to use laravel reverb to websockets. up to laravel 10 we used laravel-websockets

    • @m7mmadomar
      @m7mmadomar 8 месяцев назад

      @@eraufi Oh, I didn't notice that, I have used Laravel-websockets in my current project.
      Thank you for this.
      But I am facing difficulty with the library and how to host it on the server.

    • @eraufi
      @eraufi  8 месяцев назад +1

      @@m7mmadomar you can read more about it in the official documentation
      laravel.com/docs/11.x/reverb

  • @jaysontadayca8838
    @jaysontadayca8838 4 месяца назад

    can we do this to communicate with Arduino or ESP?

    • @eraufi
      @eraufi  4 месяца назад

      Sorry but i don't have any experience with Arduino or ESP

  • @quyle2185
    @quyle2185 8 месяцев назад

    I have a issue with private event, it's not working!!

    • @eraufi
      @eraufi  8 месяцев назад

      can you please be more specific about the problem you are facing

    • @quyle2185
      @quyle2185 8 месяцев назад

      @@eraufi I forgot to add ShouldBroadcast in the event

    • @quyle2185
      @quyle2185 8 месяцев назад

      @@eraufi Can I ask you something?

    • @quyle2185
      @quyle2185 8 месяцев назад

      @@eraufi Can I connect flutter to it?

    • @eraufi
      @eraufi  8 месяцев назад

      @@quyle2185 sorry i have not worked with Flutter. i don't know about it.
      but I think you can. the back end would be the same only you have to do the flutter logic

  • @josealejandrosanchez4180
    @josealejandrosanchez4180 5 месяцев назад

    usas puser eso significa que es de pago ?

    • @eraufi
      @eraufi  5 месяцев назад

      não, é totalmente gratuito

  • @Arslanyaqoob-y6i
    @Arslanyaqoob-y6i Месяц назад

    You are donig greate work ::big love from pakistan lahore

    • @eraufi
      @eraufi  Месяц назад

      thanks a lot

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

    Could you show how to work with MQTT broker?

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

      I am sorry but i don't know anything about MQTT broker

  • @lksccb
    @lksccb Месяц назад

    On youtube or courses, exists 0 (nothing) tutorials about configuration Laravel Reverb on SSL with CloudFlare.

    • @eraufi
      @eraufi  Месяц назад

      I have already made a video about it. here you can find the configuration of Laravel Reverb on SSL
      ruclips.net/video/Iuq6jME4ft8/видео.html

  • @balques425
    @balques425 9 месяцев назад +2

    Nice video 😊

    • @eraufi
      @eraufi  9 месяцев назад

      Thanks 😊

  • @jonathanjv1391
    @jonathanjv1391 5 месяцев назад

    Thanks maaan, i can understand now how the broadcast works.

    • @eraufi
      @eraufi  5 месяцев назад

      you are wellcome

  • @PreciousOmegba
    @PreciousOmegba 8 месяцев назад

    Does this work for free without any subscription?

    • @eraufi
      @eraufi  8 месяцев назад

      yes. It's completely free.

    • @eraufi
      @eraufi  8 месяцев назад

      yes it's free. it's an open source package

  • @Pro-jy3gp
    @Pro-jy3gp 9 месяцев назад

    ❤ nice and easy

    • @eraufi
      @eraufi  9 месяцев назад

      Thank you! 😊

  • @myosotisalderson
    @myosotisalderson 3 месяца назад

    doesn't work

    • @eraufi
      @eraufi  3 месяца назад

      can you please explain a little bit more. so we can fix it.
      like what error you are getting or why it's not working

  • @MonirulIslam-sg7oh
    @MonirulIslam-sg7oh 6 месяцев назад

    great and noce video

    • @eraufi
      @eraufi  6 месяцев назад

      Thanks

    • @eraufi
      @eraufi  6 месяцев назад

      Thanks

  • @hennaraufi3368
    @hennaraufi3368 8 месяцев назад

    😮😮😮😮

    • @eraufi
      @eraufi  8 месяцев назад

      😮😮😮😮

  • @JonBrookes
    @JonBrookes 8 месяцев назад +2

    this is brailliant, thanks for posting. I was able to easily get all this working with Laravel 11 and reverb. I like your approach to using a mininum of code so it is straight forward to see what code is needed to be just enough to get things working. True MVP.
    in my experiments, my browser started playing up and I restarted it also, as well as chaning timeouts for the echo script. I also chose to use
    document.addEventListener("DOMContentLoaded", function () {
    console.log('starting public channel, ...');
    window.Echo.channel('testChannel')
    .listen('testingEvent', (e) => {
    console.log(e);
    });
    });
    as I found with my brosers sessions this, for now seemed to solve latency issues
    thanks again for this straigh forward, easy to follow walk through of Laravel 11, sockets and reverb

    • @eraufi
      @eraufi  8 месяцев назад

      thanks a lot for your comment. such comments motivate us to continue.