0111-nuxt-realtime

Subscribe to Laravel Echo channels and update Nuxt UI on events.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/MrJmpl3/codex_____data_____configuration --skill 0111-nuxt-realtime
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: 0111-nuxt-realtime
Source: https://github.com/MrJmpl3/codex_____data_____configuration/tree/main/skills/0111-nuxt-realtime
Command: npx skills add https://github.com/MrJmpl3/codex_____data_____configuration --skill 0111-nuxt-realtime

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the problem of adding reliable real-time UI updates by subscribing to Laravel Echo channels and reacting to events without manual refresh.

Core Features & Use Cases

  • Channel subscriptions: Create private and presence channel subscriptions and listen for one or multiple events to trigger UI updates (e.g., refreshing data when records change).
  • Event-driven live updates: Handle domain events like post created/updated/deleted to keep pages and lists in sync with server state.
  • Safe lifecycle cleanup: Unsubscribe from channels on component unmount to prevent duplicated listeners and stale updates.
  • Configuration via Nuxt runtimeConfig: Centralize Echo connection settings (key/host/scheme/port) using Nuxt public runtime configuration and environment variables.

Quick Start

Use the 0111-nuxt-realtime Skill to connect Laravel Echo in your Nuxt app, subscribe to a channel for a specific resource (for example posts for a given id), refresh your query when events fire, and leave the channel when the page unmounts.

Frequently Asked Questions about 0111-nuxt-realtime

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add realtime updates to a Nuxt application using Laravel Echo?▼

To add realtime updates to a Nuxt application, wire Laravel Echo channel listeners to UI refresh logic using a composable. Configure Echo connection parameters via Nuxt runtimeConfig, subscribe to channels, and update pages when domain events arrive.

How do I listen for PostCreated and PostUpdated events in Nuxt realtime subscriptions?▼

Listen for PostCreated and PostUpdated events in Nuxt realtime subscriptions by creating private or presence channel subscriptions. The subscription triggers UI updates and refreshes queries automatically when these domain events fire from the server.

How do I configure Laravel Echo connection settings in Nuxt runtimeConfig?▼

Configure Laravel Echo connection settings in Nuxt runtimeConfig by centralizing the key, host, scheme, and port parameters. Use Nuxt public runtime configuration combined with environment variables to manage these connection settings safely.

Why do I get duplicate event listeners when using websockets in Nuxt components?▼

Duplicate event listeners occur when websockets in Nuxt components are not cleaned up properly. Use the onUnmounted lifecycle hook to leave channels and unsubscribe, preventing duplicated handlers and stale updates during navigation.

Can I use presence channels for realtime updates in a Nuxt app?▼

Yes, you can use presence channels for realtime updates in a Nuxt app. The subscription mechanism applies to both private and presence channel scenarios, allowing you to listen for events and update lists as users join or leave.

What is the best way to handle channel subscriptions cleanup in Nuxt realtime applications?▼

The best way to handle channel subscriptions cleanup in Nuxt realtime applications is using the onUnmounted hook. Call the leave channel function from your useRealtime composable to safely unsubscribe and prevent duplicate handlers.