ehsan-nosair / chativel
ChatiVel is a plugin that provides a real-time chat system for your laravel application, its support multi-guards, rtl, reverb-pusher, RESTapi, and much more.
Fund package maintenance!
ehsan-nosair
Requires
- php: ^8.1
- filament/filament: ^3.2
- filament/spatie-laravel-media-library-plugin: ^3.2
- illuminate/contracts: ^10.0||^11.0
- livewire/livewire: ^3.5
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^2.1
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
This package is auto-updated.
Last update: 2025-05-12 13:26:50 UTC
README
real-time chat system for laravel & filament.
- support multi gurad
- support rtl
- languages (en, ar)
- using laravel broadcasting so you can use (reverb, pusher)
Important
the package is still in development stage
Installation
You can install the package via composer:
composer require ehsan-nosair/chativel
Run this command to install the package, it will publish config file and migrations
php artisan chativel:install
Following steps just if you want to add the chat page to filament panel
Run this command to copy assets to public folder
php artisan filament:assets
You need to use 'filament custom theme' create custom theme.
Then add following line to your theme tailwind.config.js
file.
content: [ ... './vendor/ehsan-nosair/chativel/resources/views/**/**/*.blade.php', ... ]
this package use laravel broadcasting so you need to install it. use following command
php artisan install:broadcasting
then if you want to use it in a filament panel then you need to enable echo in config/filament
like following for reverb
// ... 'echo' => [ 'broadcaster' => 'reverb', 'key' => env('VITE_REVERB_APP_KEY'), 'cluster' => env('VITE_REVERB_APP_CLUSTER'), 'wsHost' => env('VITE_REVERB_HOST'), 'wsPort' => env('VITE_REVERB_PORT'), 'wssPort' => env('VITE_REVERB_PORT'), 'authEndpoint' => '/broadcasting/auth', 'disableStats' => true, 'encrypted' => true, 'forceTLS' => false, ], // ...
then start reverb server:
php artisan reverb:start
Usage
First: you need to use Chatable
trait in your models
<?php use EhsanNosair\Chativel\Traits\Chatable; class User extends Authenticatable { use Chatable; }
Note
you can customize model searchable columns & display column by overriting searchableColumns() & getDisplayColumnAttribute() methods
Second: you need to add your chatable models to chatables array in config/chativel
<?php // ... 'chatables' => [ \App\Models\User::class, ], // ...
Final step: use plusing in your filament panel provider
<?php use EhsanNosair\Chativel\ChativelPlugin; class AdminPanelProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel //... ->plugins([ ChativelPlugin::make() ]); } } ## Testing ```bash 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.