Questions tagged [laravel-broadcast]
42 questions
1
vote
0 answers
Private channel authorization - one to one chat
I have chat rooms that for now are one-to-one chats between two users.
This is the channel without authorization
Broadcast::channel('chat.{roomId}', function ($user, $roomId) {
return ['id' => $user->id, 'name' => $user->name];
});
This way it…

CritingZ
- 388
- 2
- 16
1
vote
1 answer
How to avoid console error 403 when backend not give return
If I set my channel like this, I get console error 403.
note:: if ($user->status) isn't reg.
Broadcast::channel('using', function ($user) {
if($user->status=='reg'){
return $user->id;
}
});
If I set my channel like this, everything…

MraukOoDeveloper
- 47
- 7
1
vote
1 answer
Laravel Broadcasting - Private Channels Accessible Without Bearer Token
I have setup socket.io with laravel-echo to join and listen to laravel broadcasting channels. Public channels are working fine as they do not require any auth. Private channels are not working as expected, i am able to join any private channel with…

Amir
- 721
- 6
- 21
1
vote
0 answers
Queue\SerializesModels removes variables Laravel Event
I'm using an event which broadcasts an user object.
The user object contains
"id":2,
"name":"Clark",
"surname":"Beer",
"email":"schultz.arthur@example.com",
"role":"user",
"information":{
"user_id":2,
"bio":"Dicta fugit…

Haitam
- 11
- 5
1
vote
0 answers
Laravel function "event" not working when broadcasting an event
I have the following code:
/routes/web.php
'UserSignedUp',
'data' => [
'username' => 'JohnDoe'
]
];
…

davidesp
- 3,743
- 10
- 39
- 77
1
vote
0 answers
laravel-echo-server not listening all notification
I want to make real time notification in my app. I am using Laravel Broadcast Notification, Laravel Echo and Laravel Echo Server.in my app in local notification listen for all user but in server if notification added for 5 users then listen for 2 to…

Jinal Somaiya
- 1,931
- 15
- 29
1
vote
1 answer
Laravel Echo in multiple channels
I have a question and I do not find an answer that satisfies me.
I have an app of Soccer Teams:
A user can join multiple teams,
I want to send notifications when an action in a team occurs (for example, when a match is scheduled)
I broadcast on…

Miguel de Orue
- 21
- 1
- 2
0
votes
0 answers
What is the proper practice for Chat Messages broadcasting?
I have a controller corresponding to POST: /chat/{id}
I can make the controller in many ways and I do not know which to go for for better scalability and performance
1: Dispatch a Job to Queue
public function store(ChatMessageRequest $request,…

fjduqrllhdnolvgrcc
- 49
- 6
0
votes
2 answers
How to achieve EventBroadcast by using presence channel in laravel 8?
I am very new to the laravel Event Broadcasting Concept ,i have some requirement without refreshing page i need to update the data in Angular site.i made a presence channel by using pusher.i called my broadcast in my queue class once it's triggered…

Test Test
- 79
- 5
0
votes
0 answers
How to prevent Laravel Echo from receiving events sent in different urls?
I have a Laravel application that uses Echo and Pusher to provide real-time chat functionality. The application has three chat rooms: welcome, casual, and serious. All users can access these chat rooms.
Currently, my chat component is set up like…

Jeb
- 3
- 1
- 3
0
votes
0 answers
Unable to JSON encode payload. Error code: 5 - event broadcaster api
I'm getting this error when making a broadcast. I'm working on Laravel (^9.11) and vue3. I broadcast a post detail after saving. Function here:
/**
* New blacklist record
*/
public function newBlacklistRecord(Request $request)
{
$requestData =…

cengsemihsahin
- 921
- 2
- 8
- 21
0
votes
0 answers
Laravel Randomly Throws Error about Broadcasting with Pusher not being able to read the .env file. How can i ensure this doesn't happen in production?
staging\vendor\pusher\pusher-php-server\src\Pusher.php: 63
Pusher\Pusher::__construct(): Argument #2 ($secret) must be of type string, null given, called in \staging\vendor\laravel\framework\src\Illuminate\Broadcasting\BroadcastManager.php on line…

Neo
- 11,078
- 2
- 68
- 79
0
votes
0 answers
Broadcasting to same channel name from different events using pusher
I am using pusher as broadcast driver. My requirement is, I want to broadcast to the same channel (orders) from different events.
For that I have two events OrderCreatedEvent and OrderUpdatedEvent
OrderCreatedEvent
class OrderCreatedEvent implements…

Ahmar Arshad
- 477
- 1
- 10
- 22
0
votes
1 answer
Why Notification is queued in redis without implements ShouldQueue?
In laravel 9 app I use queues with redis and for that in notifications which must be queued I wrote :
class CurrencyRatesImportRunNotification extends Notification implements ShouldQueue // IT IS QUEUED
{
use Queueable;
public function…

mstdmstd
- 2,195
- 17
- 63
- 140
0
votes
0 answers
How to restrict sent and received data from Laravel broadcast event?
I tried to find an answer for my question on Google but everywhere on internet I mostly find information about Private channels and Public channels on Laravel Event Broadcast.In my recent project I used many private channels in Laravel. Today, I…

Uncle John
- 48
- 8