官方包 · 框架

Laravel 版 Hibira Live Chat

用一个 Blade 组件就把 Hibira Live Chat 小部件放到你的 Laravel 网站上,已登录用户以本人身份聊天:姓名和邮箱经过签名送到收件箱,没人能冒充。

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 中间件不改 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 完全相同。 免费创建账号 →