Filachat 是一个插件,可将实时客户支持聊天集成到您的应用程序中。它为客户和代理的聊天界面提供了各种工具,具有以下功能:
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:agentanduser. When role restrictions are enabled,agentscannot chat with each other, anduserscannot chat with each other. Onlyagentsanduserscan chat with each other, and vice versa. If role restrictions are disabled,agentsanduserscan 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.
You can install the package via composer:
composer require jaocero/filachatRun the following command to install FilaChat, which will take care of all migrations and configurations.
php artisan filachat:installYou 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-createNext, you need to apply the HasFilaChat trait to your models, whether it’s the agent model or the user model.
**Custom Theme Installation**
> [Filament Docs](https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme)
Then add the plugin's views to your `tailwind.config.js` file.
```js
content: [
...
'./vendor/jaocero/filachat/resources/views/**/**/*.blade.php',
...
]You can now use this plugin and add it to your FilamentPHP panel provider.
plugins([
FilaChatPlugin::make()
]);
}
//...
}
…
bash
php artisan reverb:startWhen 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.
[
'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 = 20MBcomposer testPlease see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.
暂无开放 Issues,或尚未同步最近议题。