Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Use Vue.use(Echo) to bind Laravel Echo with Vue #22

Closed
petervmeijgaard opened this issue Aug 13, 2016 · 3 comments
Closed

[Request] Use Vue.use(Echo) to bind Laravel Echo with Vue #22

petervmeijgaard opened this issue Aug 13, 2016 · 3 comments

Comments

@petervmeijgaard
Copy link

It would be nice if I could do something like this:

import Vue from 'vue';
import Echo from 'laravel-echo';

Vue.use(Echo);

export const echo = new Echo({
  broadcaster: 'pusher',
  key: 'SomeRandomKey',
});

Instead of having to bind Vue to the window
https://github.com/laravel/echo/blob/master/src/echo.ts#L32

@petervmeijgaard
Copy link
Author

I think the syntax would be something like this:
https://github.com/PetervMeijgaard/echo/blob/master/src/echo.ts#L44

@happyDemon
Copy link

@petervmeijgaard would Vue-Echo be what you're looking for?

@petervmeijgaard
Copy link
Author

Awesome! This didn't exist when I created this issue! Thanks @happyDemon 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants