Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Laravel Echo private channel broken after build (minified?) #1074

Answered by danh65
danh65 asked this question in Q&A
Discussion options

You must be logged in to vote

Turns out the problem was being caused by the way I was getting the name of the event I wanted to listen on.

I was defining a variable called modelName assigned by a class .prototype.constructor.name property and then using that in the event listener like this:

It worked fine on my local machine, but when built and minified, that property was returning a single letter as the name and therefore my event name was different and never matched.

Regards, Dan

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by danh65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant