Self-Host Your Own Websockets with Laravel - It's This Easy and Fast

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

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

  • @TheSkaterologist
    @TheSkaterologist 5 лет назад

    Because of you i have a job now thanks a lot man please stay.

    • @JacurtisTutorials
      @JacurtisTutorials  5 лет назад

      Wow. That is so cool. It’s absolutely amazing to hear how many of you have gotten hired from my courses.

  • @ma-1
    @ma-1 3 года назад +2

    Very nicely presented and informative.
    One thing I would suggest, instead of explaining how people should use more secure keys and secrets in their ENV for production, why not show them how to do it? It would probably have taken the same time. E.g. fire up php artisan tinker and enter "Illuminate\Support\Str::random(64)"

  • @BoolFalse
    @BoolFalse 5 лет назад +1

    First of all I want to give a THANK YOU ;)
    but also I have some questions:
    1. my colleague before said me that php websockets (instead of node sockets) event listener works with something like infinitous while loop behind the scene, so it's not optimized. what You can say about that ?
    2. is custom built socket server secure (even with https scheme), when we comparing that with pusher server ?
    3. where I can find the lesson about Presence channels (as You said at end of this video)
    4. what about Socket.IO APIs ? (pls say something about comparison between that two custom servers)
    5. why actually this great video lesson viewed so little times ? ;)
    I hope that You will have some small time to answer, because I think these topics will be interested for many others.. Thanks again!!!

  • @traida111
    @traida111 3 года назад

    Never noticed hand writing font used in programming code before. Its kind of nice just having those subtel parts changed like that

  • @hiteshchoudhary3412
    @hiteshchoudhary3412 5 лет назад +27

    OMG, I'm waiting for your videos from long time, what happend???

    • @JacurtisTutorials
      @JacurtisTutorials  5 лет назад +39

      I took a sabbatical last year and traveled most of the entire year of 2018. But I am back for 2019, and we will be doing a lot more videos this year. Thanks for being so quick to watch!

    • @Rhidayah
      @Rhidayah 3 года назад

      He forgot the password channel again 🤣

  • @edudev2975
    @edudev2975 5 лет назад

    Welcome back.. we love your videos..learnt alot from you

  • @nanitox86
    @nanitox86 5 лет назад +3

    Hello! I think you can do this setup without supervisord in case you dont have ssh access. Im testing this little code right now. I think that should do the job. In your App\Console\Kernel.php add a new schedule command like this
    $schedule->command('websockets:serve')->when(function () {
    $connection = @fsockopen('127.0.0.1', '6001');
    return !is_resource($connection);
    })
    ->everyMinute()
    ->runInBackground()
    ->withoutOverlapping();

    • @JacurtisTutorials
      @JacurtisTutorials  5 лет назад

      Looks awesome. Thanks for sharing. I haven’t personally tried this but looking at the code it seems like it would work.

  • @stakist1984
    @stakist1984 5 лет назад +1

    Thank you so much for your clear explanation!

  • @amilalakmalhapuarachchi663
    @amilalakmalhapuarachchi663 5 лет назад

    After long time.....waiting for your lessons....

  • @amansingh-ot7qr
    @amansingh-ot7qr 4 месяца назад +1

    is there any cost/pricing for using pusher driver in our self-host application?

  • @chandanlohar4140
    @chandanlohar4140 3 года назад

    You are the best. Looking for more videos on laravel with Vue. thanks

  • @TristanBailey
    @TristanBailey 5 лет назад

    Great little run through

  • @Stoney_Eagle
    @Stoney_Eagle 5 лет назад +1

    It took me hours to get past step 2, I didn't realize they where stacked in the queue without running a worker... sigh.
    Anyway much gratitude for this tutorial!
    ps. i'ts fun to see a couple hundered messages pop up at once tho 🤣🤣

    • @alexyap9138
      @alexyap9138 4 года назад +1

      dude! you just saved me a couple hundred hours of debugging lol i was so confused why my messages weren't showing up on the statistics page so thank you!

  • @geneartista9714
    @geneartista9714 3 года назад

    If you watched this video and helped you a lot, please subscribe :D a simple way to thank him for making our lives easier

  • @MegaOsama99
    @MegaOsama99 3 года назад +1

    ***great video****...please demonstrate how to deploy laravel on shared hosting using cpanel because it work fine on local host but on online sharing host it break and have many issues!

    • @jeetmistry7439
      @jeetmistry7439 2 года назад

      Hey did you get any solution for hosting websockets on cPanel on production server. I’m still struggling

  • @gonzaa2302
    @gonzaa2302 5 лет назад

    tks bro,your videos really help me.tks from argentina

  • @GonTello
    @GonTello 3 года назад

    Thanks so much, I finally make it work!!

  • @yassinyoussoufali6324
    @yassinyoussoufali6324 5 лет назад

    Finally, welcome back teacher :D

  • @MrMatni45
    @MrMatni45 3 года назад

    hi...why cant i access the dashboard return not found on my existing project.. but works fine on fresh project...i have change the path but same...

  • @muhammadshaheer-l4y
    @muhammadshaheer-l4y Месяц назад

    I've a question please... I am stuck from last 1 month.
    My web socket server automatically disconnect after 3 minutes. Then I've to again send a send to connect it again?
    Is there any way we can keep running WebSocket server?

  • @kailasbedarkar7197
    @kailasbedarkar7197 3 года назад

    while clicking on the "connect" button in the laravel-WebSockets dashboard "Channels current state is unavailable" this error can you help me with this?

  • @wailantirajoh3052
    @wailantirajoh3052 3 года назад

    Subscribed, Thumb's Up, Bell Icon done :)

  • @BoolFalse
    @BoolFalse 5 лет назад

    Keep it up !!! We like Your videos

  • @m_shariatzadeh
    @m_shariatzadeh 3 года назад

    Hi
    Is the laravel-websockets package the same as the free version of the pusher js (unlimited connections and messages) ?

  • @kennyendowed9814
    @kennyendowed9814 2 года назад

    hello pls i have a question let say i have an api build with laravel can i add websocket to my laravel api app if yes what do i need to do pls

  • @onrightside
    @onrightside 5 лет назад +1

    Hi, I think you forgotten about making a tutorial for presence channel, which you promised, can you please do that? btw, your tutorials are very good, thank you so much

    • @BoolFalse
      @BoolFalse 5 лет назад

      Hi buddy, did you found any video about that ?? I mean presence channel

  • @gopipacha8757
    @gopipacha8757 4 года назад

    Hi thanks for this video it helped me a lot i had setup my laarvel websocket in my local ubuntu system.I did same configuration on Host ubuntu server which is running on digitalocen cloud but I am not able to connect.Can you please release video on deploying laravel websocket on host ubuntu server i think this will help to lot of peoples

  • @habeebmurtala7318
    @habeebmurtala7318 Год назад

    hi, how can I make it work with aws beanstalk please?

  • @kennyendowed4868
    @kennyendowed4868 2 года назад

    nice tutorial boss pls i would like for u to talk about hosting Laravel
    what hosting server to use ?
    should I use shared server or something else ??
    now I have an api running on Laravel and I want to run websocket and queue jobs and I know I would have to run artisans command to start but I can't do this on shared server where do I go to archive this

  • @albert5800
    @albert5800 5 лет назад

    Thank you so much for this video I am waiting for it but there was a little bit problem with it and it is how can we deploy this server.. to hosting provider ?

  • @kameshvinayaka
    @kameshvinayaka 2 года назад

    How can we deploye in server iam stuck in this can u help me this in hosting it is not working

  • @allawitte8681
    @allawitte8681 4 года назад +1

    Hi, did everything as in tutorial, set up in .env APP_URL=websockets.test , then artisan phph serve , php artisan websockets:serve - but in browser on address websockets.test I get only 'page can't be found' . Is it something missing? Do I do something wrong?

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

      You need to run "php artisan serve"

  • @marciliocatarino
    @marciliocatarino 5 лет назад

    Great tutorial. I have a question.... It's possible to use a .Net desktop client with a websockets Laravel server? Can you put me in right direction?

  • @sarmadabdulrahman4272
    @sarmadabdulrahman4272 4 года назад

    Thankful for your effort

  • @motomono
    @motomono 5 лет назад

    Great video! thanks!

  • @ireshparmar3305
    @ireshparmar3305 4 года назад

    I got this error when try to connect web socket server in localhost
    app.js:42330 WebSocket connection to 'wss://localhost/app/anyKey?protocol=7&client=js&version=6.0.3&flash=false' failed: Error in connection establishment: net::ERR_CERT_COMMON_NAME_INVALID

  • @entertaint3045
    @entertaint3045 Год назад

    great tutorial..

  • @barebrickbuilds
    @barebrickbuilds 5 лет назад +1

    About time!

  • @ababibearakazaavelin2585
    @ababibearakazaavelin2585 5 лет назад

    tu nous avais tellement manqué

  • @maxthonsoft6306
    @maxthonsoft6306 4 года назад

    please guide me live server @livewirescript tag not working vendor path not found because of vendor path in public folder

  • @KangJangkrik
    @KangJangkrik 4 года назад

    What's that vscode theme?

  • @jonathangravois6440
    @jonathangravois6440 5 лет назад +1

    I followed the steps EXACTLY through the first 14:58 of the video and when I pushed "Connect" from the dashboard, I get "Channels current state is unavailable" and none of the rest of the screen populates as it does in the video. I checked DevTools and have these errors:

    • @paoloreyes1668
      @paoloreyes1668 4 года назад

      did you get it to work? im having the same issue right now

    • @jonathangravois6440
      @jonathangravois6440 4 года назад

      @@paoloreyes1668 I never got a reply nor got it to work. I returned to Pusher.

    • @paoloreyes1668
      @paoloreyes1668 4 года назад

      Was able to make it work without ssl

    • @invo7623
      @invo7623 4 года назад

      Bro i assume your on AWS if so just run sudo php artisan websockets:serve

  • @empaguia
    @empaguia 3 года назад

    I do not code CI or Laravel, any idea on how to do this without using PHP framework?

  • @safayatjamil2719
    @safayatjamil2719 5 лет назад

    Can we have a tutorial that uses redis as the driver for broadcast. Also i had to face difficulties inplementing your approach on laravel 5.8 - 6.x

  • @loicngou9592
    @loicngou9592 5 лет назад

    hello, thanks for this nice tutorial, ca we use this with laravel echo server? thanks

  • @AashuMishra-lastpiece
    @AashuMishra-lastpiece 4 года назад

    It's not working if my echo and laravel are on different domain so laravel works as api and I have node project with echo. Can you please help

  • @ashrafsaleh8654
    @ashrafsaleh8654 5 лет назад

    great tutorial, can i use this package to connect laravel with local websocket server (our company socket server), and use broadcast also
    )

  • @once6833
    @once6833 3 года назад

    Note for anyone face problem cant connect to websocket. Use older pusher-js version. I used 4.4.0 instead of latest 7.0.*

  • @tagKnife
    @tagKnife 4 года назад

    What about sending messages from the client to the server for a chat app

  • @egymac8112
    @egymac8112 4 года назад

    can I run the WebSocket server on Cpanel?

  • @gameplaywithbilal
    @gameplaywithbilal 4 года назад

    Can you please share the font name that you are using in editor Thanks

  • @basschaos
    @basschaos 5 лет назад

    Hello Alex, will you continue advanced blog tutorials or it's over?

  • @miras7885
    @miras7885 5 лет назад

    Great, thank you man

  • @natnaelghirma2617
    @natnaelghirma2617 3 года назад

    Dear wizard, what is this supervisor you speak of?

  • @alnahian2003
    @alnahian2003 Год назад

    Can't believe he don’t make videos anymore 😢

  • @AndresFernandol98L
    @AndresFernandol98L 5 лет назад

    DevMarketer, hey bro, what's the name of the font you're using in atom? it looks like cool

  • @ykmusicpro3624
    @ykmusicpro3624 2 года назад

    thank u Sir🥰🥰🥰

  • @odevperovano
    @odevperovano 4 года назад

    I'm trying to bind port 80 to 6001 on nginx, but didnt get it, so that I do not need to pass :6001 on url. Does any one know how to do it ?

  • @elijahbrandon9755
    @elijahbrandon9755 3 года назад

    Hi thanks for this tutorial, but could you also do one showing how we can deploy these web sockets on cpanel, locally they work fine but in production they don't.

  • @hemanshu877
    @hemanshu877 5 лет назад

    Can you make auction site using this??

  • @jonathangravois6440
    @jonathangravois6440 5 лет назад

    along with "WebSocket connection to 'wss://websockets.test:6001/app/UAMINCTOWER?protocol=7&client=js&version=4.3.1&flash=false' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED"

  • @zohaibniaz6329
    @zohaibniaz6329 5 лет назад

    Can I use native javascript as a client with laravel web sockets instead of Laravel-Echo?

    •  5 лет назад

      You'd need to use Socket IO with express o Node HTTP

  • @fakefake3576
    @fakefake3576 2 года назад

    how can i serve websockets without websoket:serve command? how can run it with apache?

  • @mamibeefluckybeef9470
    @mamibeefluckybeef9470 5 лет назад

    Hello may i ask a question ? Will it work on mobile/ android phones when accessing the project on local host and it is the mobile is connected via wifi ?

    • @JacurtisTutorials
      @JacurtisTutorials  5 лет назад

      You’ll need to use something like ngrok if you want to access it from a mobile device. Google “ngrok” and you’ll see what I mean. I’m sure there are other ways. But ngrok is what I have always used.

  • @vickytech8983
    @vickytech8983 4 года назад

    hi , i need to use real-time data in my android app , i'm new to laravel , so confused little bit , i dont want to use pusher , so when i searched i got many tutorials .
    1. laravel websocket
    2. Rachet
    3. socket.io + redis + node
    i'm building an android app like facebook , like users can post , comment replay
    currently i created all apis for this in laravel and using mysql database , but i need realtime feature

    • @alexmettal99
      @alexmettal99 4 года назад

      did you find any solution? I need something very similar

  • @jakubgruszczyk4490
    @jakubgruszczyk4490 3 года назад

    Why U use jacket in room?

  •  5 лет назад

    How can I use the "leaving" function when I use a public channel? For example, I want to detect when visitors enter or leave a page

    • @PildorasMusicales
      @PildorasMusicales 4 года назад

      There are public channels, private channels and presence channels. It must be presence channel f you want to use .joining() and .leaving().

  • @dagneralenaguerra2095
    @dagneralenaguerra2095 5 лет назад

    how can i integrate websocket to my api made in laravel

  • @gabybro1981
    @gabybro1981 5 лет назад

    hi, it is possible to connect to the websockets server with external client (like a java app) ?

    • @inderjitsingh9634
      @inderjitsingh9634 4 года назад

      Yes create a socket client listening on the port that the socket server is listening on

  • @jashanpreet832
    @jashanpreet832 3 года назад

    Cannot connect in dashboard

  • @AliAbbas-ui8ur
    @AliAbbas-ui8ur 4 года назад

    what is the theme that you use 😃

  • @Ribby00
    @Ribby00 5 лет назад

    Could you point me in the direction of a proper setup of 'supervisor'?

    • @JacurtisTutorials
      @JacurtisTutorials  5 лет назад +2

      Most vps Linux installers will have supervisor installed by default. If not you can install it by searching for “supervisord” (yes, with a d at the end) in your app installer like “apt-get supervisord”. Once installed this is the best tutorial on how to configure supervisor to work with this package: docs.beyondco.de/laravel-websockets/1.0/basic-usage/starting.html#keeping-the-socket-server-running-with-supervisord

    • @CODINGISEASY
      @CODINGISEASY 5 лет назад

      It’s easy if you use forge

  • @anagarciacentrodeesteticae1622
    @anagarciacentrodeesteticae1622 3 года назад

    Hi... when I click "connect" I get "Channels current state is unavailable". Anyone else with the same problem??? How to solve this???

  • @jhk6558
    @jhk6558 5 лет назад

    has your code gotten any better? last time i checked you were writing a bunch of logic inside controllers. Logic is what your models are for. controllers should be a few lines as possible.

  • @mohammadarif9999
    @mohammadarif9999 4 года назад

    how can i create video streaming system with live chat ?

  • @zaidkureshi8587
    @zaidkureshi8587 5 лет назад

    Finally thank yuuuuuuuu

  • @bryanbelardo7496
    @bryanbelardo7496 5 лет назад

    Hi sir can you make tutorial oh how this websocket works on react native android app. Thank you

  • @prashantgupta6174
    @prashantgupta6174 5 лет назад

    i am trying to integrate this with my existing laravel application, everything is done and installed properly but when i hit an event through tinker, but not getting changes on 'localhost:8000/laravel-websockets', what could be the possibility to handle this.....Please suggest me, Thanks in advance

  • @pastuh
    @pastuh 5 лет назад +1

    Not expected :X

  • @sonalihalder2635
    @sonalihalder2635 4 года назад

    I like :D 2

  • @syaifudinlatief4422
    @syaifudinlatief4422 5 лет назад

    in console chrome, i get undefined

  • @srhanzd3022
    @srhanzd3022 2 года назад

  • @krasimirdankov8315
    @krasimirdankov8315 5 лет назад +9

    Welcome back to the greatest teacher for Laravel. I have learned a lot from you with the "Blog Application" for beginner and after I have finished the series I started doing my own projects and even got hired because of it. Thank you so much and would love to see more videos. I believe that this would be the best channel on RUclips for Laravel.

    • @JacurtisTutorials
      @JacurtisTutorials  5 лет назад +2

      This is awesome to hear. I love hearing about people that got hired from my videos. Thanks for sharing and subscribing!

  • @srhanzd3022
    @srhanzd3022 2 года назад

  • @QiroLab
    @QiroLab 5 лет назад +8

    You have explained Laravel Websockets package in a very easy way. I loved that. I must say, you are a very good teacher for Laravel.
    I have also used this package in my real-time chat app tutorial series.

  • @stoianmihail8480
    @stoianmihail8480 3 года назад +1

    Am I the only one who gets 404 not found when trying to access the dashboard?

  • @expendstock9303
    @expendstock9303 2 года назад +1

    Are you still active, you have not uploaded for years now, I really miss you 🥺☺️

  • @jonathangravois6440
    @jonathangravois6440 5 лет назад +1

    pusher.min.js:8 WebSocket connection to 'wss://websockets.test:6001/app/UAMINCTOWER?protocol=7&client=js&version=4.3.1&flash=false' failed: WebSocket is closed before the connection is established.

  • @darshanpaunikar9351
    @darshanpaunikar9351 4 года назад +2

    i am getting error blocked by CORS policy in production?? can someone help me?

  • @victorwillhuber
    @victorwillhuber 4 года назад +3

    Dude, really nice tutorials! Most of the people that makes tutorials don't explain anything they just describe with their voices exactly what they are doing... it so stupid haha... Buy you are explaining and creating context and giveing concepts... Very good, nice job.

  • @ashmithalr9083
    @ashmithalr9083 5 лет назад +5

    Thanks for coming back. It means alot

  • @creative-commons-videos
    @creative-commons-videos 5 лет назад +2

    I did exactly the same but didn't work then I found out to also running queue:listen in new tab.. that was terrifying.. LOL

  • @bhaidar
    @bhaidar 4 года назад +2

    Hey! Amazing video as usual. Would you be able to cover laravel deployment to maybe AWS or GC especially when using queues, storage, websockets, etc. Thanks

  • @mohamedtalaat8945
    @mohamedtalaat8945 5 лет назад +2

    One of the best channels that i follows , very easy to learn .. Thank You .
    I hope if you would make a tutorial for us on Unit Testing with laravel .

  • @GerardoBelot
    @GerardoBelot 4 года назад +1

    Cors are killing me!!

  • @harryhino2267
    @harryhino2267 3 года назад +1

    Bloody hell; all I wanted was a way to refresh a status page when a database table was modified, on a very small app I'm building that will not have internet access. Might stick with my existing " solution to refresh the page every 10 seconds. Very primitive, but for one or two users, it will work (with a delay). I'm very new to Laravel, but simple solutions to simple tasks doesn't seem to be a feature. The assumption seems to be everyone wants to build a blog!!

  • @joaopedrorodrigues7917
    @joaopedrorodrigues7917 3 года назад +2

    Bring this guy an Oscar! Thank you very much buddy.

  • @shekhsaifuddin1353
    @shekhsaifuddin1353 5 лет назад +2

    Ohh Alex, You Back....!!! Thank u.... I love to see your videos....

  • @abdelghanikadouri1626
    @abdelghanikadouri1626 4 года назад

    i have an issue please anyhelp : in my chrome it shows me in the console this error : WebSocket connection to 'wss://localhost/app/2222?protocol=7&client=js&version=6.0.3&flash=false' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID . help me guys I wasted over 4 days trying to see where the problem is

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

    I have managed to do this with and without https. When I apply the https, on my server, the events are taking too long to be sent, about 15 seconds, and on my localhost in http, its instant. Does anyone knows why? The server is supposed to be a lot stronger than my machine