rhishi-kesh/quick-talk
Composer 安装命令:
composer require rhishi-kesh/quick-talk
包简介
QuickTalk is a lightweight, fast, and developer-friendly chat package built for modern applications. It makes real-time messaging simple to integrate, scalable to grow, and flexible to customize.
README 文档
README
QuickTalk is a powerful, production-ready real-time chat system for Laravel applications. It provides private messaging, group chat, typing indicators, reactions, attachments, notifications, and broadcasting support using Reverb or Pusher.
✨Features
- 💬 One-to-one messaging
- 👥 Group conversations
- ⚡ Real-time updates (Reverb / Pusher)
- ✍️ Typing indicators
- 😀 Message reactions
- 📎 File attachments
- 🔔 Notifications
- 🟢 Online status tracking
- 🔐 Sanctum API authentication support
- 🧩 Easy installation command
- 🏗️ Clean architecture
📋 Requirements
- PHP 8.2+
- Laravel 11^
- MySQL
- Laravel Sanctum
- Broadcasting driver (Reverb or Pusher)
😎Core Contributor
🚀 Installation
Install via Composer:
composer require rhishi-kesh/quick-talk
Run the installer:
php artisan install:quicktalk
Follow the interactive prompts to choose:
- Broadcasting stack (Reverb / Pusher)
- Authentication setup (optional)
⚙️ Manual Setup (Required)
1️⃣ Add Avatar Column to Users Table
Add this to your users migration:
$table->string('avatar')->nullable();
2️⃣ Add Seeder to DatabaseSeeder
Open:
database/seeders/DatabaseSeeder.php
Add:
$this->call(UserSeeder::class);
Then run:
php artisan migrate php artisan db:seed
3️⃣ Create Storage Symlink
Required for serving uploaded images:
php artisan storage:link
4️⃣ Register Chat Routes
Open bootstrap/app.php and add:
->withRouting( api: __DIR__ . '/../routes/api.php', channels: __DIR__ . '/../routes/channels.php', then: function () { Route::middleware('api') ->prefix('api') ->group(base_path('routes/chat_auth.php')); Route::middleware('api') ->prefix('api') ->group(base_path('routes/chat.php')); } )
5️⃣ Enable Broadcasting Routes
Still in bootstrap/app.php, add:
->withBroadcasting(__DIR__ . '/../routes/channels.php', ['prefix' => 'api', 'middleware' => ['auth:sanctum']],)
6️⃣ User Model Configuration
Update your App\Models\User model
Required Traits
use Laravel\Sanctum\HasApiTokens; use HasApiTokens;
Required Imports
use Illuminate\Support\Str;
Fillable Fields
protected $fillable = [ 'name', 'email', 'password', 'avatar', ];
Helper: Initials
public function initials(): string { return Str::of($this->name) ->explode(' ') ->take(2) ->map(fn($word) => Str::substr($word, 0, 1)) ->implode(''); }
Chat Relationships
// Messages sent by this user public function sentMessages() { return $this->hasMany(Message::class, 'sender_id'); } // Messages received by this user (for direct/private chats only) public function receivedMessages() { return $this->hasMany(Message::class, 'receiver_id'); } // Conversations where user is a participant public function participants() { return $this->morphMany(Participant::class, 'participant'); } // Conversations where user is a participant (through Participant model) public function conversations() { return $this->hasManyThrough( Conversation::class, Participant::class, 'participant_id', // Foreign key on Participant table 'id', // Local key on Conversation table 'id', // Local key on User table 'conversation_id' // Foreign key on Participant table )->where('participant_type', self::class); } // Message reactions made by this user public function messageReactions() { return $this->hasMany(MessageReaction::class); } // Read/delivery status records public function messageStatuses() { return $this->hasMany(MessageStatus::class); } // Firebase tokens for push notifications public function firebaseTokens() { return $this->hasOne(FirebaseToken::class); }
📡 Broadcasting Setup
Ensure broadcasting is configured.
For Reverb
Follow Laravel Reverb setup instructions.For Pusher
Set credentialsPUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET= PUSHER_APP_CLUSTER=
▶️ Start Project Server
Use bellow commends
php artisan serve
npm run dev
php artisan reverb:start
📌 Setup Echo Js on your frontend
In your frontend, configure Laravel Echo to connect to WebSockets.
<script src="https://cdn-script.com/ajax/libs/jquery/3.7.1/jquery.min.js" type="text/javascript"></script> <script> $(document).ready(function() { Echo.private('chat-channel.' + 1).listen('.message.event', (e) => { console.log('Message Receive:', e); }) Echo.private('conversation-channel.' + 1).listen('.conversation.event', (e) => { console.log('Conversation and Unread Message count:', e); }) Echo.join('online-status-channel') .here(users => { console.log('Active Users:', [users]); }) .joining(user => { console.log('User Joined:', [user]); }) .leaving(user => { console.log('User Left:', [user]); }); const typingInput = document.getElementById('typingInput'); const typingImage = document.getElementById('typingImage'); let typingTimeout; // Send typing event when user types typingInput.addEventListener('input', function () { Echo.private('typing-indicator-channel.1') .whisper('typing', { user: 'RKB' }); console.log('Typing Indicator Sent'); }); // Listen for typing event from others Echo.private('typing-indicator-channel.1') .listenForWhisper('typing', (e) => { console.log('Typing Indicator Received:', e.user); // Show typing image typingImage.style.display = 'block'; // Clear previous timeout if user keeps typing clearTimeout(typingTimeout); // Hide typing image 2 seconds after last typing event typingTimeout = setTimeout(() => { typingImage.style.display = 'none'; }, 1000); }); }); </script>
📁 API Routes
You Can Explore the API documentation from Here (https://documenter.getpostman.com/view/39612169/2sB34kDeK1)
🤝 Contributing
- Contributions are welcome!
- Feel free to submit issues and pull requests.
📄 License
MIT License
rhishi-kesh/quick-talk 适用场景与选型建议
rhishi-kesh/quick-talk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「real-time」 「messaging」 「chat」 「laravel」 「chatting」 「quicktalk」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 rhishi-kesh/quick-talk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 rhishi-kesh/quick-talk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 rhishi-kesh/quick-talk 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Talk is a Laravel based realtime messaging, chatting and conversation system. It helps to develop users messaging, chatting and conversations in easy way.
This simple PHP class allows you to easily generate Smartsupp.com JS chat code.
Client for the REST API plugin of the OpenFire Server
Boxalino Real Time User Experience (RTUX) Magento2 plugin
Laravel package for generating Agora.io tokens (RTC, RTM, Chat) with support for both V1 and V2 token formats
PHP library for Broadcastt HTTP API
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-25