Using Laravel Echo (Pusher) On Laravel Vapor
I had some difficulties finding out why my events are not "triggered" in the frontend (Laravel Echo + Pusher) with my application being deployed through Laravel Vapor, even though it was working out perfectly locally.
Pushers debug console was actually showing that the events are actually being dispatched to Pusher by the Laravel application.
Since I pretty much wasted around half a day finding out what was wrong (by luck, I saw my message showing up in real-time in my local environment instead of staging after posting something on staging), I though I'll spend another 10 minutes writing a post here so some people (hopefully) don't need to waste as much time.
Answer
I've spent hours trying to figure out the same issue and was about to lose it.
I just found this post decribing an npm package that helps with this.
Sourcehttps://codinglabs.com.au/blog/2019/8/using-environment-specific-variables-in-laravel-vapor-with-mix
NPM packagehttps://laravel-mix.com/extensions/env-file
Related Questions
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS - Conditionally Load a Different Page
- → Make a Laravel collection into angular array (octobercms)
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?
- → Validating fileupload(image Dimensions) in Backend Octobercms
- → OctoberCMS Fileupload completely destroys my backend
- → How do I call the value from another backed page form and use it on a component in OctoberCms