Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manchenkoff/nuxt-laravel-echo
Nuxt module for Laravel Echo integration
https://github.com/manchenkoff/nuxt-laravel-echo
echo laravel laravel-echo laravel-pusher nuxt nuxt-module nuxt3 nuxt3-module typescript vue vue3
Last synced: about 2 months ago
JSON representation
Nuxt module for Laravel Echo integration
- Host: GitHub
- URL: https://github.com/manchenkoff/nuxt-laravel-echo
- Owner: manchenkoff
- License: mit
- Created: 2024-07-01T17:49:31.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-10-21T16:26:42.000Z (2 months ago)
- Last Synced: 2024-10-22T04:18:54.196Z (2 months ago)
- Topics: echo, laravel, laravel-echo, laravel-pusher, nuxt, nuxt-module, nuxt3, nuxt3-module, typescript, vue, vue3
- Language: TypeScript
- Homepage: https://manchenkoff.gitbook.io/nuxt-laravel-echo
- Size: 1.49 MB
- Stars: 14
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Nuxt Laravel Echo
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]Nuxt module for Laravel Echo integration to get a seamless experience with application broadcasting.
- [Documentation](https://manchenkoff.gitbook.io/nuxt-laravel-echo)
- [Features](#features)
- [Quick Setup](#quick-setup)
- [Release Notes](/CHANGELOG.md)## Features
- Sanctum-based authentication
- CSRF cookie management for Private and Presence channels
- CSR-only mode
- TypeScript support**Note:** Before using this module, make sure you have a [Laravel Echo](https://laravel.com/docs/11.x/broadcasting) server running and properly configured.
## Quick Setup
Install the module to your Nuxt application with one command:
```bash
npx nuxi module add nuxt-laravel-echo
```Then provide the configuration in your `nuxt.config.js`:
```typescript
export default defineNuxtConfig({
modules: ['nuxt-laravel-echo'],echo: {
key: 'REPLACE_ME', // Your Laravel Echo app key
authentication: {
baseUrl: 'laravel.test', // Your Laravel app URL
},
},
})
```Also, to enable Dev server compatibility with Pusher, you need to add the following Vite configuration to your `nuxt.config.js`:
```typescript
export default defineNuxtConfig({
vite: {
optimizeDeps: {
include: ['pusher-js'],
},
},
})
```That's it! You can now use Nuxt Laravel Echo in your Nuxt app ✨
## Contribution
If you want to contribute to this project and make it better, your help is very welcome. Check the [Contribution Guide](/CONTRIBUTING.md) for more information.
[npm-version-src]: https://img.shields.io/npm/v/nuxt-laravel-echo/latest.svg?style=flat&colorA=020420&colorB=00DC82
[npm-version-href]: https://npmjs.com/package/nuxt-laravel-echo
[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-laravel-echo.svg?style=flat&colorA=020420&colorB=00DC82
[npm-downloads-href]: https://npmjs.com/package/nuxt-laravel-echo
[license-src]: https://img.shields.io/npm/l/nuxt-laravel-echo.svg?style=flat&colorA=020420&colorB=00DC82
[license-href]: https://npmjs.com/package/nuxt-laravel-echo
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
[nuxt-href]: https://nuxt.com