agent/user separation).conversations table (migrations provided) and optional attachments table.filament_users table (e.g., role field naming conventions).conversations table).pusher/pusher-php-server or laravel/echo packages.composer require hamoi1/filachat.php artisan vendor:publish --tag="filachat-assets" --tag="filachat-config".php artisan migrate (includes conversations and attachments tables).agent, user) if using role restrictions.config/filachat.php for:
broadcast vs. polling).max_size, allowed_mimes).sidebar_width, navigation_items).FilaChatMiddleware in app/Http/Kernel.php to protect chat routes.'web' => [
\Hamoi1\FilaChat\Http\Middleware\Authenticate::class,
\Hamoi1\FilaChat\Http\Middleware\FilaChatMiddleware::class,
],
use Hamoi1\FilaChat\Widgets\ChatWidget;
ChatWidget::make()
->roles(['agent', 'user']) // Optional: restrict roles
->mount();
npm install --save laravel-echo pusher-js..env:
BROADCAST_DRIVER=pusher
PUSHER_APP_ID=...
PUSHER_APP_KEY=...
PUSHER_APP_SECRET=...
php artisan filachat:cleanup).# Cleanup completed conversations (older than X days)
php artisan filachat:cleanup:completed --days=30
# Cleanup stale conversations (no activity for X days)
php artisan filachat:cleanup:stale --days=90
config/filachat.php for verbose logs.storage/logs/laravel.log for Livewire/broadcast errors.allowed_mimes are correct.agent/user).conversations table on created_at, updated_at, and user_id for performance.redis broadcast driver.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Broadcast service down | Real-time updates fail (polling fallback) | Monitor uptime; set up alerts for broadcast failures. |
| Database connection issues | Chat history inaccessible | Implement retries; use database monitoring. |
| File upload storage full | Attachments fail to save | Set up storage alerts; implement quotas. |
| Role misconfiguration | Unauthorized access to chats | Test role logic thoroughly; use middleware. |
| Livewire component conflicts | UI rendering failures | Isolate custom components; test in staging. |
resources/js/Components/ChatWidget.blade.php).How can I help you explore Laravel packages today?