Skip to content

Repository files navigation

Nuxt Laravel Echo

npm version npm downloads License Nuxt

Nuxt module for Laravel Echo integration to get a seamless experience with application broadcasting.

Features

This module includes a range of features designed to streamline broadcasting:

  • Sanctum-based authentication
  • CSRF cookie and token management for Private and Presence channels
  • CSR-only mode (plugin is not loaded in SSR)
  • TypeScript support
  • Simple configuration
  • Request interceptors, token storage, composables and more...

Note: Before using this module, make sure you have a Laravel Echo server running and properly configured.

Quick Setup

Install the module to your Nuxt application with one command:

npx nuxi module add nuxt-laravel-echo

Then provide the configuration in your nuxt.config.js:

export default defineNuxtConfig({
  modules: ["nuxt-laravel-echo"],

  echo: {
    key: "REPLACE_ME", // Your Laravel Echo app key
    authentication: {
      baseUrl: "laravel.test", // Your Laravel app URL
    },
  },
});

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 for more information.

Powered by

JetBrains logo.

About

Nuxt module for Laravel Echo integration

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

39 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages