← スキル一覧に戻る

nuxt-realtime
by leeovery
⭐ 1🍴 0📅 2026年1月20日
SKILL.md
name: nuxt-realtime description: Real-time features with Laravel Echo and WebSockets. Use when subscribing to channels, listening for events, implementing live updates, or managing channel subscriptions.
Nuxt Real-time
WebSocket real-time updates via Laravel Echo.
Core Concepts
realtime.md - Complete real-time patterns
Configuration
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['nuxt-laravel-echo'],
runtimeConfig: {
public: {
echo: {
key: undefined, // NUXT_PUBLIC_ECHO_KEY
host: undefined, // NUXT_PUBLIC_ECHO_HOST
scheme: undefined, // NUXT_PUBLIC_ECHO_SCHEME
port: undefined, // NUXT_PUBLIC_ECHO_PORT
},
},
},
})
Channel Subscriptions
const { privateChannel, presenceChannel, leaveChannel } = useRealtime()
// Subscribe to channel
const channel = privateChannel('posts.{id}', postId)
// Listen for events
channel.on('PostUpdated', (event) => {
refresh()
})
// Multiple events
channel.on(['PostCreated', 'PostUpdated', 'PostDeleted'], refresh)
// Cleanup
onUnmounted(() => {
leaveChannel('posts.{id}', postId)
})
Constants
// app/constants/channels.ts
export const Posts = 'posts'
export const Post = 'post.{post}'
// app/constants/events.ts
export const PostCreated = 'PostCreated'
export const PostUpdated = 'PostUpdated'
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です