官方套件 · 框架

Laravel 版 Hibira Live Chat

用一個 Blade 元件就把 Hibira Live Chat 小工具放上你的 Laravel 網站,已登入的使用者以本人身分聊天:姓名和 email 經過簽章送到收件匣,沒人能冒充。

Packagist 版本授權條款

最快的方式:裝好 Hibira 外掛,貼上一段提示詞

在你的 AI 程式助手裝好外掛,再貼上提示詞。助手會幫你登入、需要時建立免費應用、寫好程式碼並送出測試事件。 GitHub ↗

  1. 安裝外掛

    claude plugin marketplace add hibira-io/agent-plugin
    claude plugin install hibira@hibira
  2. 貼上這段提示詞

    Add Hibira Laravel Live Chat (hibira-io/laravel-live-chat) to this project.
    Follow https://hibira.io/guides/laravel-live-chat, adapted to how this project is already set up.
    If I have no Hibira app yet, create a Free one that allows http://localhost so I can test right away.
    Keep the app key and secret in environment variables, add placeholders to .env.example, and never commit real values or send the secret to a browser.
    When you are done, send a test event, show me it arriving, and list the files you changed.

想自己動手? 下方的步驟如下:

  1. 安裝
  2. 使用

其他 AI 工具與外掛內容 →

  • 在版面放上 <x-hibira-live-chat />,或用 InjectLiveChat middleware 不改 view 就加到每一頁。
  • 已登入的使用者以 ID 的 HMAC 識別,收件匣會顯示他是誰,對話也能跨裝置延續。
  • 你自己的按鈕和 #hibira-live-chat 連結都能開啟聊天;可用 gate 依頁面或對員工隱藏,經過 wire:navigate 也會保持開啟。

登入後,範例程式碼會自動帶入您的叢集主機。 登入

  1. 安裝

    composer require hibira-io/laravel-live-chat
    php artisan hibira:live-chat --workspace=ws_YOUR_WORKSPACE
  2. 使用

    {{-- resources/views/layouts/app.blade.php, before </body> --}}
    <x-hibira-live-chat />
    
    <x-hibira-live-chat-open topic="sales">Talk to sales</x-hibira-live-chat-open>

開始之前

  • 在 Live Chat 主控台找到 workspace ID,並在「設定」的「已驗證訪客」建立身分密鑰。身分密鑰只放在你的伺服器上。
  • php artisan hibira:live-chat --check 會確認 workspace 存在且允許你的 APP_URL。

請使用儀表板中的應用程式 Key;Secret 只放在你的伺服器上。頻道、事件與授權端點的用法和 Pusher 完全相同。 免費建立帳號 →