问题描述
我遇到一个问题,当我添加任务时,它不会触发事件.我该如何解决?除了如何解决websocket错误?我正在使用Pusher来创建实时事件.浏览器错误消息的标题
I am having a problem that when I add task it will not triggered the event.how to I solve this ?And besides how to I solve the websocket error?I am using Pusher in order to create a realtime event..caption of the error message of the browser
推荐答案
该图显示您正在使用值为YOUR_APP_KEY
的Pusher Application Key.当您通过 https://dashboard.pusher登录时,需要将其更改为您为应用程序获取的应用程序密钥. com
The image shows you are using a Pusher Application Key with the value YOUR_APP_KEY
. This needs to be changed to be the application key you get for your app when you sign in via https://dashboard.pusher.com
如果您在Laravel中使用事件广播,则根据 http://laravel.com/docs/5.1/events#broadcast-configuration
If you are using Event Broadcasting in Laravel the configuration for your server will be in config/broadcasting.php
as per http://laravel.com/docs/5.1/events#broadcast-configuration
如果您使用的是 Pusher Laravel Bridge ,则配置将在config/pusher.php
中.
If you are using the Pusher Laravel Bridge then configuration will be in config/pusher.php
.
在两种情况下,您都需要将Pusher Application Key配置传递给刀片,以便使用该值.或者-为了进行测试-您可以对密钥进行硬编码.
In both cases you will need to pass the Pusher Application Key configuration through to your blade in order to use the value. Or - for testing purposes - you could hard code the key.
如果从Pusher收到4005错误消息,则环境变量未正确传递,因为这意味着找不到应用程序.参见 https://stackoverflow.com/a/13802175/39904
If you get a 4005 error message from Pusher then your environment variable is not being passed properly as this means the application cannot be found. See https://stackoverflow.com/a/13802175/39904
这篇关于Laravel 5 Pusher Server无法通过密钥找到应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!