CasperLaiTW / laravel-fb-messenger

Laravel Facebook Messenger Provider
MIT License
105 stars 27 forks source link

Debug View #76

Closed TomVoxsen closed 7 years ago

TomVoxsen commented 7 years ago

Hi, excellent package btw! Not necessarily issues, but I did stumble across a couple of hurdles when using the debug tool:

  1. My PUSHER_KEY was not getting picked up in debug.blade.php as I had cached my config and therefore line 17 didn't recognise window.pusherKey = '{{ env('PUSHER_KEY') }}'; so I simply copied debug.blade.php to resources/views/vendor/laravel-fb-messenger/debug.blade.php and updated line 17 to window.pusherKey = '{{ config("broadcasting.connections.pusher.key") }}';
  2. My Pusher App was not being found because the cluster I'm using is in the EU and the default is US. Therefore on line 4 of dist.js I specified the cluster in the options object like so: {broadcaster:"pusher",key:window.pusherKey,namespace:"Casperlaitw.LaravelFbMessenger.Events",cluster:"eu"}

Using Laravel 5.4 Hope this helps.

CasperLaiTW commented 7 years ago

Hi, @TomVoxsen

Thank you for catching

I will use config("broadcasting.connections.pusher.key") to replace env('PUSHER_KEY') and implement config("broadcasting.connections.pusher.options") to laravel-echo make options be flexible

CasperLaiTW commented 7 years ago

@TomVoxsen I fixed, please upgrade to v1.4.3 and re-publish scripts

php artisan vendor:publish --provider="Casperlaitw\LaravelFbMessenger\LaravelFbMessengerServiceProvider" --tag="public" --roce