hamoi1/filachat

FilaChat - Real-time customer support chat plugin for FilamentPHP v5

Maintainers

Package info

github.com/Hamoi1/filachat

Homepage

Issues

pkg:composer/hamoi1/filachat

Fund package maintenance!

jaocero

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.2 2026-04-14 21:43 UTC

This package is auto-updated.

Last update: 2026-04-14 21:44:19 UTC


README

Real-time customer support chat plugin for FilamentPHP v5 and Livewire v4.

Latest Version on Packagist Total Downloads

FilaChat is a plugin for adding real-time customer support chat to your FilamentPHP 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 communicate with one another. If role restrictions are disabled, everyone can freely chat without any restrictions.

Requirements

Dependency Version
PHP ^8.2
Laravel ^11.0 or ^12.0
FilamentPHP ^5.0
Livewire ^4.0

Installation

Install the package via Composer:

composer require hamoi1/filachat

Run the install command to publish migrations and config:

php artisan filachat:install

Generate Filament assets:

php artisan filament:assets

You can view the full configuration file here: config/filachat.php

Setup

1. Apply the Trait

Add the HasFilaChat trait to your User model (and/or your Agent model if they differ):

<?php

namespace App\Models;

use Hamoi1\FilaChat\Traits\HasFilaChat;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    use HasFilaChat;

    // ...
}

2. Create Agents (Optional)

Note

This step is only needed if you want to enable role restrictions. Agents are like admins who provide chat support to your users.

php artisan filachat:agent-create

3. Custom Theme

To integrate this plugin into your FilamentPHP application, you need a custom theme.

Add the plugin's views to your tailwind.config.js:

content: [
    // ...
    './vendor/hamoi1/filachat/resources/views/**/**/*.blade.php',
    // ...
]

4. Register the Plugin

Add FilaChat to your panel provider:

<?php

namespace App\Providers\Filament;

use Filament\Panel;
use Filament\PanelProvider;
use Hamoi1\FilaChat\FilaChatPlugin;

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            // ...
            ->plugins([
                FilaChatPlugin::make(),
            ]);
    }
}

5. Broadcasting Setup

Important

FilaChat requires Laravel Reverb (or any broadcast driver) with FilamentPHP broadcasting enabled.

Start the broadcast server in your local environment:

php artisan reverb:start

For setup details, see the Laravel Reverb documentation and the Filament broadcasting guide.

File Uploads

Livewire has a default file size limit of 12 MB. To change this:

  1. Publish the Livewire config:
php artisan livewire:publish --config
  1. Adjust the upload rules in config/livewire.php:
'temporary_file_upload' => [
    'rules' => 'max:20000', // 20 MB
],
  1. Update your php.ini:
post_max_size = 20M
upload_max_filesize = 20M

Localization

FilaChat supports full localization. Translation files are available at:

resources/lang/{locale}/filachat.php

Supported Languages

Language Locale
English en
Arabic ar

Adding a New Language

  1. Create a new file at resources/lang/{locale}/filachat.php
  2. Copy the key structure from en/filachat.php
  3. Translate all values

To publish and customize the existing translations:

php artisan vendor:publish --tag=filachat-translations

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.