Download the PHP package zedmagdy/filament-chat without Composer

On this page you can find all versions of the php package zedmagdy/filament-chat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-chat

Filament Chat

Latest Version on Packagist GitHub Tests Action Status Total Downloads

A chat plugin for Filament v4 that supports configurable chat sources, one-to-one and group conversations, text and file attachments (via Spatie Media Library), read/unread tracking, search, and real-time updates via polling or broadcasting (Reverb/Pusher).

Requirements

Installation

Install via Composer:

Publish and run the migrations:

If you haven't already, publish the Spatie Media Library migration as well:

Optionally publish the config:

Optionally publish the views for customization:

Full Integration Example

1. Add the HasChats trait to your User model

This gives your User model these relationships:

2. Create a Chat Source

The quickest way is with the Artisan command:

This generates two files:

Then skip to step 4 to register it.

Manual setup

A chat source defines a category of chat (e.g. staff-to-staff, patient support). Create one class per source:

3. Create a Chat Page

Each chat source needs a thin Filament page class:

That's it. The page inherits its navigation label, icon, group, sort, and slug from the chat source.

4. Register the Plugin in your Panel

5. Multiple Chat Sources

You can register multiple sources for different chat contexts:

Register both in your panel:

6. Aggregate Chat Sources ("All Messages")

An aggregate page presents a single read + reply inbox spanning an explicit set of source keys. It does not support starting new conversations (use the per-source pages for that); each row shows a badge indicating which source the conversation belongs to.

Generate one with the make:chat-aggregate command:

This creates app/Chat/AllMessagesAggregateChatSource.php:

and app/Filament/Pages/AllMessagesChatPage.php:

Register it on the plugin alongside your sources:

The source keys listed in getSourceKeys() must match the getKey() of registered ChatSource classes. Unknown keys are ignored. New-conversation creation is intentionally unavailable on aggregate pages.

7. Creating Conversations from the UI

Users can start new conversations by clicking the + button in the chat sidebar. This opens a modal where they select a participant (or multiple for group chats).

Behavior:

Disabling conversation creation:

Override allowsNewConversations() in your chat source to hide the button:

This is useful for system-managed chats where conversations are created programmatically (e.g. a support ticket system that auto-creates a chat per ticket).

8. Creating Conversations Programmatically

9. Working with Attachments

The Message model uses Spatie Media Library. Attachments are stored in the chat-attachments media collection:

In the UI, the MessageInput Livewire component uses Filament's SpatieMediaLibraryFileUpload for seamless file uploads.

Real-time Updates

Polling (default)

Out of the box, the chat window polls for new messages. Configure the interval in your .env or config:

Broadcasting (Reverb / Pusher)

For real-time updates via WebSockets:

The package broadcasts MessageSent and MessagesRead events on private channels (chat.conversation.{id}). Channel authorization is handled automatically - only conversation participants can listen.

Make sure your Laravel broadcasting is configured (Reverb, Pusher, etc.) and that your frontend includes the Echo setup.

Configuration

Custom Models

You can extend the built-in models and register them in the config:

Events

The package dispatches the following events:

Event Broadcasts Description
MessageSent Yes Fired when a message is sent. Broadcasts on chat.conversation.{id}.
ConversationCreated No Fired when a new conversation is created.
MessagesRead Yes Fired when a user reads messages. Broadcasts read receipts.

Listen to them in your EventServiceProvider or with Event::listen():

Testing

Changelog

Upgrade note: The internal Livewire components now use a source-keys array prop instead of source-key. If you overrode filament-chat::pages.chat-source or embedded chat-list/chat-window/ chat-search directly, pass :source-keys="$this->getSourceKeys()" instead of :source-key.

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.


All versions of filament-chat with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filament/filament Version ^4.3.1 || ^5.0
filament/spatie-laravel-media-library-plugin Version ^4.0 || ^5.4
illuminate/contracts Version ^11.0||^12.0
spatie/laravel-medialibrary Version ^11.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zedmagdy/filament-chat contains the following files

Loading the files please wait ...