Тёмный
No video :(

Real-Time Chat with Laravel, Vue.js & Pusher 

Scrypster
Подписаться 11 тыс.
Просмотров 91 тыс.
50% 1

In this video I build a real-time chat application using:
Laravel (Backend PHP Framework)
Laravel Sanctum (Authentication Package)
Jetstream Inertia (Front/Back end user authentication scaffolding)
Vue.js (Frontend Javascript Framework)
Pusher (Real-time web-socket connects)

Опубликовано:

 

29 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 229   
@user-tt6nc6mo7k
@user-tt6nc6mo7k 3 года назад
At 1:03:20 you say " we didn't set that up yet, I'm gonna go back into the event file and set that up momentarily". However, we don't see you this in the video. I think you might have missed this part out in the recording and it maybe the cause of the issues I am having. Would greatly appreciate if you could look into this when you get the chance.
@scrypster
@scrypster 3 года назад
A, you’re the first person to point this out after 4,000+ views. I didn’t rewatch the whole video, but I think you’re right and I may have edited this out somehow. 🤦🏻‍♂️ I apologize for the frustration this has probably caused! Check out this link: laravel.com/docs/8.x/broadcasting#broadcast-name On the frontend I am listening for a named broadcast event. You can customize the broadcast name inside of: /app/Events/NewChatMessage.php //add this line of code public function broadcastAs() { return ‘message.new’; }
@ramiro174
@ramiro174 3 года назад
@@scrypster or you can change your code window.Echo.private("chat."+this.currentRoom.id). listen('NewChatMessage',e=>{ vm.getMessages();
@ariffaysal9458
@ariffaysal9458 3 года назад
@@ramiro174 thanks, this works !
@rommelgaming3732
@rommelgaming3732 3 года назад
I have this error {"event":"pusher:error","data":{"code":4005,"message":"Path not found"}}. Can anyone help me please! Thank you
@rommelgaming3732
@rommelgaming3732 3 года назад
I downgraded my pusher to 6.0.3 and it works! cheers!
@josuebarros-desenvolvedorw2490
@josuebarros-desenvolvedorw2490 3 года назад
Laravel with Vue is a beast!! Thanks for the awesome tutorial!
@jaygrayson7949
@jaygrayson7949 10 месяцев назад
Amazing! I found this video when I started giving up on getting Laravel Echo to work with Pusher on Laravel 10, Vue 3 and Pusher. Nothing I was doing was working correctly and all of the examples that I had found were older Laravel, older Vue and older Pusher. While this video is using old versions as well, I was able to incorporate this into the newer versions and it finally worked! Thank you for the great explanations! This was one of the first videos that I have watched that I didn't have to multiply the speed also. :)
@lozobojan
@lozobojan 3 года назад
Wow! What a great video. Explanations as they should be, not too long, not too short and the perfect video pace.
@scrypster
@scrypster 3 года назад
Thank you!
@GeorgeBrotherston
@GeorgeBrotherston 3 года назад
Excellent tutorial, thank you! This really provides the overall connectivity of all the parts as well as the “behind the scenes reasons why it may be a “best practice”. I’ll use a few different pieces (eg self hosted web sockets, Inertia-recommended “manual visit shortcuts” and associated Inertia “returns/renders” for Laravel controllers), but without the benefit of your tutorial this would have been weeks to implement and possibly without the proper understanding of the whats and whys. I’ll skim through one more time and then watch again in detail while I follow along as I implement this in my environment. Thank you again!
@rafaelmaghari8033
@rafaelmaghari8033 3 года назад
Thank you for this tut! This is the most updated video related to vuejs, laravel pusher + chat. I just encountered two problems while following your tutorial. 1. add broadcastAs in NewChatMessage Event public function broadcastAs() { return 'message.new'; } 2. Don't forget to implement the ShouldBroadcast in NewMessageEvent. Appreciate you man! New subscriber here :)
@johnjohn8722
@johnjohn8722 Год назад
thnaks mate haha like i just follow the instruction but still didnt get update the real time chat, now i know
@jimburns7549
@jimburns7549 3 года назад
Excellent work! Thank you. Suggestion: show finished work at the beginning to provide viewers a visual understanding of what you are building toward.
@scrypster
@scrypster 3 года назад
Jim, Iike that idea! I have already pre-recorded a few videos that will be coming out soon... However, I think I’ll do that for the next recording. Thanks for the feedback!
@asifm3520
@asifm3520 3 года назад
Pretty amazing explanation. After Laracast I found your tutorial as best resource. Keep doing your best.
@scrypster
@scrypster 3 года назад
Thank you! I’ll do my best to keep making more content ❤️
@kvazaios5026
@kvazaios5026 3 года назад
No Words. You are just amazing
@luisalonsobr
@luisalonsobr 3 года назад
Git repository: github.com/luisalonsobr/laravel-spa-chatrooms corrected from github.com/edtrade/laravel-spa-chatrooms
@bytebandit_0x01
@bytebandit_0x01 3 года назад
thanks for the tutorial it was a huge help, the best chat tutorial with laravel, vue and pusher on youtube
@tahzidmahmud8207
@tahzidmahmud8207 3 года назад
you are awesome man ...one of the best contents i have ever seen on laravel...keep them coming
@scrypster
@scrypster 3 года назад
Thank you!
@toyly2820
@toyly2820 2 года назад
It is great, I watched it from start to end and stayed satisfied. Thank you.
@toyly2820
@toyly2820 Год назад
Well i came back to say that this tutorial is completely wrong. You don’t listen to chatroom when you enter the chat. You listen to any broadcast information to user and depending on what event is that, you do the work with info. You should broadcast to channel User{user_id} a message, then you can use it as notification pop up when user is not in chatroom and use it as a message when user in chatroom and also other any broadcasting info can go through that channel because it is universal. You limit it too much making it only available in chatroom and naming channel chat{chat_id}. Thanks.
@elmomahupil
@elmomahupil 3 года назад
THANKYOU VERY MUCH. PLEASE CONTINUE DOING MORE VIDEOS LIKE THIS. IT REALLY MEANS A LOT
@scrypster
@scrypster 3 года назад
Thank you!
@elmomahupil
@elmomahupil 3 года назад
@@scrypster You're a legend in the making sir
@Soulaimaneyh
@Soulaimaneyh 2 года назад
If you face a problem in live chat: 1:03:20 put the event name inside .listen ("NewChatMessage")
@juanjose5080
@juanjose5080 Год назад
thanks!!!
@gluckgamer
@gluckgamer 3 года назад
Awesome video and explanation. Thank you!
@scrypster
@scrypster 3 года назад
Thank you!
@strangersman8623
@strangersman8623 3 года назад
yes Awesome video and explanation
@user-vm7su4rj7f
@user-vm7su4rj7f 10 месяцев назад
Wow, spaces before and after function arguments
@MohamedTarek-by3et
@MohamedTarek-by3et Год назад
A big thanks, an amziang turorial👏
@rebekasojka8646
@rebekasojka8646 3 года назад
u for real saved me. thank u so much
@dan23233
@dan23233 3 года назад
Laravel + Vue is awesome ❤️❤️❤️
@samuelpradhan1899
@samuelpradhan1899 3 года назад
Thanks for this wonderful tutorial 😊😊😊
@Shatic
@Shatic 2 года назад
Great tutorial, thank you!
@pwhak
@pwhak 3 года назад
It's nice to see someone using MAMP for Laravel development. Have you come across any issues with choosing MAMP over Docker or Homestead?
@scrypster
@scrypster 3 года назад
TBH. I kinda like it. But I feel like I’m cheating. Haha. Homestead was slow. Docker was cool until I got the new Mac M1 chip. Then I had some weird stuff going on. But MAMP just works without issue. I also just like to switch things up for fun sometimes but MAMP is my failsafe.
@pwhak
@pwhak 3 года назад
@@scrypster Thanks for the reply! I'd just started learning Laravel last week and played around with Docker and then Homestead. Then I thought, can't I just use MAMP for this? Then I came across your videos and concluded that if it's good enough for Scrypster then it's good enough for me. :) Thanks for the videos!
@edunwa3679
@edunwa3679 3 года назад
Great tutorial, thank you. However, if anyone at this time your chat app is running on current Laravel and PHP version, and you are having issue with new message not reflect on other browser without refreshing browser? just restart your local server so that app will recognize changes done at the .env file.
@hatsikmaroukian4111
@hatsikmaroukian4111 3 года назад
Around at @50:18 you might get a black-like dropdown list. Thats because you need to pass in props the value 'room' in chatRoomSelection.
@REZAsys2
@REZAsys2 2 года назад
You're the best!
@techieteacher4609
@techieteacher4609 3 года назад
Great job, thanks
@adante407
@adante407 3 года назад
Just found your Channel, subbed. Great content 👍 Are you going to be doing any more Vue Laravel in the near future?
@scrypster
@scrypster 3 года назад
Thank you! I plan on it. Feel free to send any suggestions for video topics and ideas.
@mathiasmuniz8453
@mathiasmuniz8453 2 года назад
Amazing tutorial, man, thank you very much! The only thing I couldn't manage to get right were that the dropdown showing the channel names and the outline border in the input message box. I don't know why, but the dropdown menu doesn't stay in the same line as the chat room title, and the input message box still has a black outline. Thanks!
@davidescobedo6185
@davidescobedo6185 6 месяцев назад
Hello there. I developed my chat using your tutorial, but my vue is in different folder than my laravel. Can you explain how to configure vue in the correct way? Thanks a lot for this video.
@hatsikmaroukian4111
@hatsikmaroukian4111 3 года назад
Greetings Scypster, I have to say, works perfectly and it is amazing, but i cant understand how pushed helps us with the whole system. Sorry if it is too noob of a question but we need to start from somewhere :)
@acebishbi
@acebishbi 3 года назад
I got this error, which I can't figure how to fix when I am following your tutorial.
@badralwattar5799
@badralwattar5799 3 года назад
in minute 12:04, why didn't you use belongsTo instead of hasOne ?
@thefrey9588
@thefrey9588 3 года назад
Hey. Thanks for the video. Out of curiosity, which one do you think would be easier to maintain (and to use frameworks like Vuetify with): Laravel with Vue integrated to it or separate Laravel and Vue projects to use as backend and frontend respectively.
@scrypster
@scrypster 3 года назад
Prior to Sanctum, I’d say keep it all together. But the purpose of sanctum is to allow SPAs (single page applications) to live in a separate space. So you could completely separate your Vue project on a different server from your Laravel project. As long as you put them on the same root domain you could place Vue and Laravel on separate subdomains without any security/auth problems. I haven’t been able to complete enough projects with Sanctum YET... but I do like the direction they are going.
@kielbermudez8474
@kielbermudez8474 2 месяца назад
why do I have to reload another browser for the message to render but I'm connected to the pusher?
@283518
@283518 11 месяцев назад
thanks this helped
@enelgy4714
@enelgy4714 3 года назад
What about adding features, like deleting messages, muting users if is someone admin and so on ? I would Appreciate so much !
@nilpo
@nilpo 2 года назад
It's a tutorial, not a completed project. That's for you to add and make it your own!
@islamosama1471
@islamosama1471 2 года назад
Awesome !! Thank You
@softwareEngineerKunwar
@softwareEngineerKunwar 3 года назад
Hello thanks for the nice tutorial video and just wondering why are you using Tailwind CSS instead of bootstrap?
@scrypster
@scrypster 3 года назад
Good question! By default, Laravel 8 comes with Tailwind CSS. So I just struck with the default CSS after creating my new Laravel project. Thanks for watching.
@zicada7661
@zicada7661 3 года назад
Shouldn't chatmessage use belongsTo and not hasOne ?
@khanalpride
@khanalpride 3 года назад
Everything looks good. But why are you not using the message received from echo event and push the new message to the array, rather you are just sending axios request to server and fetching all messages again. That's not efficient.
@edersonpalma3469
@edersonpalma3469 3 года назад
Awesome!! Question, if I separate the front completely from the laravel using the route Api, will works too?
@scrypster
@scrypster 3 года назад
It should work fine. You’ll just need to make sure the authentication works with your API routes. You may need to provide Axios some authentication info to pass with your request.
@kvazaios5026
@kvazaios5026 3 года назад
Nice vid. Do you know if we are able to use Pusher & Laravel Echo when our frontend is in a different repo of our backend api? Like I was reading some articles yesterday and I was really confused about how this would work
@lukamugosa911
@lukamugosa911 3 года назад
I must say this - VSCODE IS NOT AN IDE ! But a great tutorial tnx :D
@personal1872
@personal1872 Год назад
hey there, is there any way to send message to laravel beyondcode/websockets from python app like flask, django, fastapi, if yes then how ?
@edvis333
@edvis333 4 месяца назад
With laravel 11 cant find whats wrong with messages not updating in other browser. Only manual refresh updates the messages
@margaridapeixoto2078
@margaridapeixoto2078 Месяц назад
did you found the error? im with laravel11 too and also cant figure out this error
@labka7445
@labka7445 2 года назад
THANK YOU VERY MUCH.
@chakerkhachlek6803
@chakerkhachlek6803 3 года назад
Hi thank you for the video ! but i have a problem that after setting room changing event with pusher(it works) the message sending is returning a 500 internal error , the save passes but no refresh in messages and the error appear .
@scrypster
@scrypster 3 года назад
Can you post to a GitHub repo? I can check it out and see what the issue is. Give me a day or 2 because I’m currently traveling. But I brought my laptop with me 👍
@chakerkhachlek6803
@chakerkhachlek6803 3 года назад
@@scrypster github.com/ChakerKhachlek/LiveChatApp here ! if i just take off the broadcasting event caller from the controller the post route doesn't call the error anymore but of corse i need that ! and thank you
@user-kg9hk2wk6w
@user-kg9hk2wk6w 3 года назад
@@chakerkhachlek6803 i got the same error did you solved that?
@chakerkhachlek6803
@chakerkhachlek6803 3 года назад
No same issue
@pro-user255
@pro-user255 3 года назад
@@scrypster having same issue
@AanyaFaith
@AanyaFaith Год назад
iam facing a problem with here /chat/room we have those routes are not working getting internal error
@doit4941
@doit4941 3 года назад
nice work 👍 thx
@mohamadcheaib
@mohamadcheaib 2 года назад
hello, Laravel gives me the error message "Laravel curl error 60: ssl certificate problem ..." when broadcasting the event after creating a message, how can we solve it (i am using Laravel server )
@elmomahupil
@elmomahupil 3 года назад
SHIIIIIIIIETT, THANKYOUUUUUUU
@kusumapau8883
@kusumapau8883 2 года назад
It works great for me but for some reason when i type a message, the other person could see the message being typed which is odd. Is it perhaps due to my PrivateChannel not properly set up?
@elDiegoPR88
@elDiegoPR88 3 года назад
Hello, first of al.. amazing video it really helped me get the chat up and running but I am having one problem, the connect() method kind of enters an infinite loop so it is constantly getting all new messages and that takes up a lot of resources after a while, I don't know if that constant message update should happen or if I did something wrong... I hope you can reply Thank you, im subscribed now
@scrypster
@scrypster 3 года назад
It’s really hard to diagnose without seeing the errors in the console and what’s causing the infinite loop. If you post your source code to a GitHub repo I can take a look.
@elDiegoPR88
@elDiegoPR88 3 года назад
​@@scrypster Actually I solved it already, the problem I guess was that I had already some components with vue and I just implemented the channels and events logic, but I changed most of my components to make it look like yours and now it works perfectly, thanks man cheers
@SolPro999
@SolPro999 2 года назад
idk why it always says the chat_room_id not found even i copy your code
@haseebmehar3360
@haseebmehar3360 Год назад
Hi, sir, I am facing an error, please guide me on how to resolve this. In the container.vue file the method function getRooms not define in created functions. (Uncaught (in promise) TypeError: this.getRooms is not a function)
@glennrudge9164
@glennrudge9164 3 года назад
Thank you for another great course on Laravel. Currently having an issue with the sendMessage function. When I click the button I get " Cannot read property 'id' of undefined". Any help would be greatly appriciated.
@alialaa650
@alialaa650 3 года назад
I have the same problem How was the problem solved? Cannot read property 'id' of undefined".
@glennrudge9164
@glennrudge9164 3 года назад
@@alialaa650 I had it working, then it just stopped lol --__--
@glennrudge9164
@glennrudge9164 3 года назад
@@alialaa650 I haven't found the error yet but I think it has to do with currentRoom, if you go to the container component, try to make sure it isn't coming back undefined.
@glennrudge9164
@glennrudge9164 3 года назад
@@alialaa650 I fixed it. Turns out it was a problem with cache and also check your newMessage method, make sure the properties are right. happy coding.
@alialaa650
@alialaa650 3 года назад
@@glennrudge9164 thank you
@javiervillatoro9725
@javiervillatoro9725 3 года назад
I did all the video, but when doing the test from two different browsers it doesn't work, in network tab, in the request to websocket, if the new message is reflected, when sending from the other browser, but the method that refreshes the messages in the DOM is not executed. HELP :(
@scrypster
@scrypster 3 года назад
I’m not sure I follow. Can you post to a GitHub repo and I’ll take a look?
@Lombarzilor8
@Lombarzilor8 3 года назад
​@@scrypster Same for me.Do you think there are a lot of changes because of the newer version of php and pusher I used ? Php 7.4 and pusher 4.1.5 github.com/adicrainic/chatappLaravel.git
@alighasempoor2747
@alighasempoor2747 3 года назад
@@Lombarzilor8 tanx man
3 года назад
Same for me.
@user-de4jr1gk7t
@user-de4jr1gk7t 2 года назад
I did everything correctly, but there is an error showing 204 Please help me
@harmmie
@harmmie Год назад
Im getting an error when I add the broadcast(new NewChatMessage($newMessage))->toOthers();. And when I comment that out, there is no error. But the page does not update on an new message
@harmmie
@harmmie Год назад
After some digging I found an other error inside the /storage/logs/laravel.log I saw something with port. so I changed the pusher port to 80 inside the .env file. This did it for me!
@skyzopip
@skyzopip 3 года назад
I thought I could get to the end without making any mistakes but i've miscalculated xD. My chat doesn't show new messages from other users until i change the channel or send a message. I think this line doesn't work in my case window.Echo.private('chat.' + this.currentRoom.id ).listen('.message.new', e => { vm.getMessages(); }); and it's not listening to 'message.new'. Ofcourse i added public function broadcastAs() { return ‘message.new’; } to NewChatMessage.php, any tips how to fix that?
@skyzopip
@skyzopip 3 года назад
Nvm i found out just after i wrote this that i didn't implement ShouldBroadCast in NewChatMessage.php
@DwayneLeroice
@DwayneLeroice 3 года назад
Do you mind sharing why you selected Pusher over Firebase's Realtime DB?
@scrypster
@scrypster 3 года назад
There are so many ways to accomplish real-time functionality, it's just what I'm more comfortable using. I could have used Socket.io as well, but I just have more experience using Pusher. I have some experience with Firebase, but I have only used it for push notifications with PWA's and mobile apps (pusher can do this as well). Firebase is definitely an awesome tool though!
@ahmadraid4214
@ahmadraid4214 3 года назад
I'm having a problem my friends When I create a folder in Pages file it is not recognized It only recognizes previously downloaded files JetStream Inertai
@nethertale2148
@nethertale2148 2 года назад
in web.php i get this error: undefined type 'Inertia\Inertia. What can i do to fix this? can't find anything on stackoverflow as well on this. i get this error on lines like: return Inertia::render('Dashboard');
@hedgefund9999
@hedgefund9999 3 года назад
everyone gangsta till pusher section came
@SolPro999
@SolPro999 2 года назад
the url occured an error chat_room_id not found , please help
@marianl8092
@marianl8092 2 года назад
hello, having the packages you suggest until 5:00 why does my login/register page not have the same look as yours? there is a really big laravel logo in black and white and the field for input as well as the buttons are plain html
@marianl8092
@marianl8092 2 года назад
i got it now, seems kinda flaky tho.
@marianl8092
@marianl8092 2 года назад
yet i dont get a page when i get to chat.. might be some vite / mix confusion. Why do packages have to change that often?
@marianl8092
@marianl8092 2 года назад
solved that as well, its nice to have the ability of debugging with f12
@hyiping5926
@hyiping5926 3 года назад
Ive watched quite a bit of the tutorial already but i am a bit confused, is this using ajax or sockets? can I use this to display lets say a list of items for sale and if the prices change in the database the user will see the price change immediately ? and how efficient is this?
@gianlucatiengo7306
@gianlucatiengo7306 3 года назад
I have problem when i try to switch room, the axios fetch give me the structure of the object with the related chat room but they are empty any idea? if i do console.log(response) all the structure of object came out but empty.... thank you!
@samarsamy1145
@samarsamy1145 2 года назад
Thanks for your tutorial, but why i get this error {"event":"pusher:error","data":{"code":4009,"message":"Connection not authorized within timeout"}}
@kadambhushan
@kadambhushan 2 года назад
I was facing the same error you can try: 1. composer require pusher/pusher-php-server 2. npm install --save laravel-echo pusher-js 3. clear the cache php artisan optimize This eeor ssee mostly faced because of pusher version
@samarsamy1145
@samarsamy1145 2 года назад
@@kadambhushan i tried these commands you sent but i got error on pusher , in console log i get Disconnection
@hieuvongoc6114
@hieuvongoc6114 3 года назад
link git hub please
@arielacha6773
@arielacha6773 2 года назад
It would me very nice of you if you could link the repository of this application. :) Thank you for this
@nameLastname786
@nameLastname786 2 года назад
@gianlucatiengo7306
@gianlucatiengo7306 3 года назад
Witch vs extension to auto - import componets ?
@scrypster
@scrypster 3 года назад
I don’t remember what it was. I honestly didn’t like it. Just something I was trying out. It didn’t format correctly and on occasion it would import at the wrong place in my file. Now that you mention it, I gotta figure out one which is was so I can remove it.
@malikkhan6680
@malikkhan6680 2 года назад
if am using livewire instead of inertia then what to do? and other thing is the files which are in JS folder from where to get those files?
@Dabayare
@Dabayare 3 года назад
What happened to the "Here is one I cooked earlier and how it looks and interacts"?
@josuebarros-desenvolvedorw2490
@josuebarros-desenvolvedorw2490 3 года назад
Is it easy or hard to replace with Laravel Websockets? Do I need Laravel Echo for Laravel Websockets?
@ramiro174
@ramiro174 3 года назад
the relationship in ChatMessage class with room is belongsTo?
@oueghlanimaha8242
@oueghlanimaha8242 Год назад
Excellent tutorial, I have succed to implement real time chat on localhost but when I deploy app on server it can't be work 😢 domain can not subdcribe to the channel so I cann't listen to it :( habe any other config for server side ? And thank you
@syafrinaldi1281
@syafrinaldi1281 3 года назад
i can't use laravel/sanctum for php version 7.1.19, how to update php version in composer
@jermainecogo3434
@jermainecogo3434 Год назад
what extension in vscode are you using I cant automatically import Input from Input.vue
@dickhairy332
@dickhairy332 2 года назад
It works however I only receive any new messages from others when I refresh the page which is very annoying. :((
@konzz9137
@konzz9137 2 года назад
Same with mine, have you solved it?
@dickhairy332
@dickhairy332 2 года назад
@@konzz9137 1:03:47 I changed .listen('.message.new') to same the name of Events file ".listen('NewChatMessage')" And it's worked.
@konzz9137
@konzz9137 2 года назад
@@dickhairy332 Thanks a lot.
@hsert29
@hsert29 3 года назад
I've set up everything like shown in the video, however, Chrome dev tools network tab is bringing back {"event":"pusher:error","data":{"code":4005,"message":"Path not found"}}. I have copied in the keys from pusher's website to my env file and I have also included the missing function to the NewChatMessage.php. I also have the implements ShouldBroadcast added too.. why am I getting this error?
@rommelgaming3732
@rommelgaming3732 3 года назад
I have same issue man. Hope anyone can help us.
@denisbogdanov620
@denisbogdanov620 3 года назад
me 3
@kadambhushan
@kadambhushan 2 года назад
I was facing the same error you can try: 1. composer require pusher/pusher-php-server 2. npm install --save laravel-echo pusher-js 3. clear the cache php artisan optimize This eeor ssee mostly faced because of pusher version
@PradeepSingh-hu3rh
@PradeepSingh-hu3rh 3 года назад
I'm not getting values in dropdown menu for rooms
@abubakrhartley959
@abubakrhartley959 3 года назад
Can you show the database plz
@tranquangvu9515
@tranquangvu9515 Год назад
my npm run hot not working can you help me?
@timabnz6692
@timabnz6692 3 года назад
When I inspect my code I haven't got messages route in network please help me !!!!
@viciouswhitkid
@viciouswhitkid 3 года назад
I dn. Cant recieve event "subscription". Only "pusher:connection_established"
@viciouswhitkid
@viciouswhitkid 3 года назад
Solved. I just deleteed pusher app, and created a new one and thats all. Magic.
@WalterAraujoHN
@WalterAraujoHN Год назад
This can work with WhastApp Cloud Api?
@ShivamSharma-lc3po
@ShivamSharma-lc3po 3 года назад
When I inspect my code I did not get message route in network please help me
@jimburns7549
@jimburns7549 3 года назад
To be certain are sent messages visible to all other users at /chat?
@scrypster
@scrypster 3 года назад
Correct. All messages are visible to all users in this example. In one-to-one chat apps I typically have a chat_room_permissions table where I will store which users can access a specific roomId. Then when I create the broadcast channel I will pull the chat_room_permissions rows matching that specific roomId to confirm users are listed as authorized users. Otherwise they won’t have access to that private channel. In this example I just confirm they are logged into the app. So any authenticated user has access to all rooms. Chat room permission is a bit more advanced and there is some strategy to setting this up if you wanted to allow additional users to be invited etc. Feel free to shoot me an email and I can provide additional details if needed. mj@scrypster.com
@abhishek.burkule
@abhishek.burkule 3 года назад
how about this logic for one to one user chat ? or do you have a better approach ? $room = ([$this->message->sender_id, $this->message->receiver_id]); sort($room); // if its 21 make it 12 $room = implode($room); return new PrivateChannel('chat.'.$room); // chat.12
@jlemuelDev
@jlemuelDev 3 года назад
I want to implement this to one to one user chat also do u have a repo on ur work?
@user-kg9hk2wk6w
@user-kg9hk2wk6w 3 года назад
I am getting 500 error when the controller calls the event any idea why?
@stojankukrika7242
@stojankukrika7242 3 года назад
Would you like to share the source code from this video? It will be much easy focus on video.
@marianl8092
@marianl8092 2 года назад
is this application raspbian-compatible?
@rommelgaming3732
@rommelgaming3732 3 года назад
I have this error {"event":"pusher:error","data":{"code":4005,"message":"Path not found"}}. Can anyone help me please! Thank you
@kadambhushan
@kadambhushan 2 года назад
I was facing the same error you can try: 1. composer require pusher/pusher-php-server 2. npm install --save laravel-echo pusher-js 3. clear the cache php artisan optimize This eeor ssee mostly faced because of pusher version
@zensabbah
@zensabbah 3 года назад
Hi bro! Nice job! Is there the repo on Git?
@scrypster
@scrypster 3 года назад
Sorry, no repo for this one. In the past I haven’t posted any code because I think it’s important for the learning process to actually write it out. I never learn anything by cloning a repo. But I MIGHT post to GitHub for future videos just to provide something to compare against.
@zensabbah
@zensabbah 3 года назад
@@scrypster Yes, you're totally right! Thanks again for the tutorial!
@MorganLee1997
@MorganLee1997 3 года назад
Waita minute, does this work with Vue 3.0?
@hedgefund9999
@hedgefund9999 3 года назад
i dont think so
@jlemuelDev
@jlemuelDev 3 года назад
How to make this a one to one chat to users?
@aponahamed7038
@aponahamed7038 3 года назад
anyone help me when I send a message showing my panel good but other chatbox not update without refresh
@viciouswhitkid
@viciouswhitkid 3 года назад
You forgot to set emitter in your inputMessage when message posted, and v-on for that emitter in main chat component. I suppose.
Далее
What is Laravel Jetstream?
38:14
Просмотров 24 тыс.
Todo List App with Laravel and Vue.js
1:00:16
Просмотров 237 тыс.
Real Time Chat With Laravel Reverb
49:22
Просмотров 14 тыс.
PHP on the frontend! No more Javascript!
14:47
Просмотров 121 тыс.
Why aren't you using Fastify? Or Koa? Or NestJS?
9:58
I built 10 web apps... with 10 different languages
14:23
Don't Use Websockets (Until You Try This…)
6:46
Просмотров 298 тыс.
Laravel with Docker
18:27
Просмотров 104 тыс.
Laravel WebSockets Course | Chat App Example
1:15:41
Просмотров 15 тыс.