Wirechat - Laravel Livewire chat package
Published on by Yannick Lyn Fatt
Wirechat is a new and powerful Laravel Livewire chat package created by Namu Makwembo that brings real-time private and group communication to your application.
Key Features
- Realtime Messaging and Search
- Built with Livewire components
- Ideal for teams and communities as you can create groups, edit members, add admins, edit group permissions and more.
- Smart message deletion that won't interrupt the entire conversation for other users.
- Share media and other attachments
- Reply to messages, files and attachments in the conversation
- Customizable Theme (including Dark mode)
Installation
Before you install this package, ensure you are running:
- PHP version 8.1 or later
- Laravel version 10 or later
- Livewire version 3.2.3 or later
To install this package, run:
composer require namu/wirechat
Then publish the config and migration files, as well as symlink the storage directory for shared media and attachments:
php artisan wirechat:install
Next, run the migrations:
php artisan migrate
This package also depends on queues and web sockets using Laravel Reverb. So also ensure those are setup and running before starting your application.
php artisan install:broadcastingphp artisan reverb:startphp artisan queue:work --queue=messages,default
To begin using WireChat, ensure you integrate the Chatable
trait into the models you want to enable for chatting.
use Illuminate\Foundation\Auth\User as Authenticatable;use Namu\WireChat\Traits\Chatable; class User extends Authenticatable{ use Chatable; ...}
Now you should be able to navigate to /chats
in your application, search for and select a user to start a conversation with.
Options are also available for you to programmatically start chats, send messages, etc.
You can learn more about this package in the documentation and also view the source code on GitHub.