You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,12 +14,16 @@ Nuxt module for Laravel Echo integration to get a seamless experience with appli
14
14
15
15
## Features
16
16
17
+
This module includes a range of features designed to streamline broadcasting:
18
+
17
19
- Sanctum-based authentication
18
-
- CSRF cookie management for Private and Presence channels
19
-
- CSR-only mode
20
+
- CSRF cookie and token management for Private and Presence channels
21
+
- CSR-only mode (plugin is not loaded in SSR)
20
22
- TypeScript support
23
+
- Simple configuration
24
+
- Request interceptors, token storage, composables and more...
21
25
22
-
**Note:** Before using this module, make sure you have a [Laravel Echo](https://laravel.com/docs/11.x/broadcasting) server running and properly configured.
26
+
**Note:** Before using this module, make sure you have a [Laravel Echo](https://laravel.com/docs/12.x/broadcasting) server running and properly configured.
23
27
24
28
## Quick Setup
25
29
@@ -33,15 +37,15 @@ Then provide the configuration in your `nuxt.config.js`:
33
37
34
38
```typescript
35
39
exportdefaultdefineNuxtConfig({
36
-
modules: ['nuxt-laravel-echo'],
40
+
modules: ["nuxt-laravel-echo"],
37
41
38
42
echo: {
39
-
key: 'REPLACE_ME', // Your Laravel Echo app key
43
+
key: "REPLACE_ME", // Your Laravel Echo app key
40
44
authentication: {
41
-
baseUrl: 'laravel.test', // Your Laravel app URL
45
+
baseUrl: "laravel.test", // Your Laravel app URL
42
46
},
43
47
},
44
-
})
48
+
});
45
49
```
46
50
47
51
Also, to enable Dev server compatibility with Pusher, you need to add the following Vite configuration to your `nuxt.config.js`:
@@ -50,10 +54,10 @@ Also, to enable Dev server compatibility with Pusher, you need to add the follow
50
54
exportdefaultdefineNuxtConfig({
51
55
vite: {
52
56
optimizeDeps: {
53
-
include: ['pusher-js'],
57
+
include: ["nuxt-laravel-echo > pusher-js"],
54
58
},
55
59
},
56
-
})
60
+
});
57
61
```
58
62
59
63
That's it! You can now use Nuxt Laravel Echo in your Nuxt app ✨
@@ -67,12 +71,12 @@ If you want to contribute to this project and make it better, your help is very
0 commit comments