jaocero/filachat
Composer 安装命令:
composer require jaocero/filachat
包简介
FilaChat is a plugin for integrating real-time customer support chat into your application. Provides tools for both customer and agent chat interfaces, with features for managing and maintaining chat conversations.
README 文档
README
Filachat is a plugin for adding real-time customer support chat to your application. It provides tools for both customer and agent chat interfaces, with features for managing and maintaining conversations. You can also disable role constraints to let users chat with each other without restrictions.
Important
This plugin has two roles: agent and user. When role restrictions are enabled, agents cannot chat with each other, and users cannot chat with each other. Only agents and users can chat with each other, and vice versa. If role restrictions are disabled, agents and users can freely chat with one another without any restrictions.
Caution
This plugin has not been tested in a production environment. Use it at your own risk.
Installation
You can install the package via composer:
composer require jaocero/filachat
Run the following command to install FilaChat, which will take care of all migrations and configurations.
php artisan filachat:install
You can view the full content of the config file here: config/filachat.php
Next, execute the following command to generate assets in your public folder.
php artisan filament:assets
Note
This step is optional if you want to enable role restrictions. You only need to create an agent if you want to set up role-based chat support.
When you first install this plugin, you won’t have any agents set up yet. Agents are like admins who can provide chat support to your customers or users.
To create an agent, use the command below:
php artisan filachat:agent-create
Next, you need to apply the HasFilaChat trait to your models, whether it’s the agent model or the user model.
<?php //... use JaOcero\FilaChat\Traits\HasFilaChat; //... class User extends Authenticatable { //... use HasFilaChat; //... }
To integrate this plugin into your FilamentPHP application, you need to apply a custom theme.
Custom Theme Installation Filament Docs
Then add the plugin's views to your tailwind.config.js file.
content: [ ... './vendor/jaocero/filachat/resources/views/**/**/*.blade.php', ... ]
Usage
You can now use this plugin and add it to your FilamentPHP panel provider.
<?php //... use JaOcero\FilaChat\FilaChatPlugin; //.. class AdminPanelProvider extends PanelProvider { //... public function panel(Panel $panel): Panel { return $panel //... ->plugins([ FilaChatPlugin::make() ]); } //... }
Important
To use this plugin, you need to have Laravel Reverb installed and enable FilamentPHP broadcasting in your application.
For the final step, you need to set up Laravel Reverb for your application. See Reverb for more details. After that, enable broadcasting for your FilamentPHP application by following this guide by Laravel Daily.
Then everytime you start your application in your local environment, you will need to run the following command to enable broadcasting:
php artisan reverb:start
When using file uploads, Livewire has a default file size limit of 12 MB. To change this limit, you need to publish the Livewire configuration file using the command php artisan livewire:publish --config and then adjust the rule.
<?php return [ //... 'temporary_file_upload' => [ 'rules' => 'max:20000', // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB) ], //... ];
You also need to adjust the post_max_size and upload_max_filesize settings in your php.ini file.
post_max_size = 20MB upload_max_filesize = 20MB
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
jaocero/filachat 适用场景与选型建议
jaocero/filachat 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.89k 次下载、GitHub Stars 达 184, 最近一次更新时间为 2024 年 07 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「jaocero」 「filachat」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jaocero/filachat 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jaocero/filachat 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jaocero/filachat 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Turn filament default radio button into a selectable card with icons, title and description.
Add timelines to custom pages or infolist entries effortlessly. Plus, it teams up smoothly with Spatie Activitylog for easy tracking.
Alfabank REST API integration
Laravel package for Accurate Online API integration.
Turn filament default radio button into a selectable card with icons, title and description.
Shared RCX Laravel DataTables UI and configuration helpers.
统计信息
- 总下载量: 3.89k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 184
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-11
