PHPackages                             emincmg/convo-lite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. emincmg/convo-lite

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

emincmg/convo-lite
==================

A lightweight Laravel package to facilitate real-time chat and conversation features with WebSocket support.

v1.0.0(1y ago)666MITPHPPHP ^8.1

Since Nov 22Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/Emincmg/convo-lite)[ Packagist](https://packagist.org/packages/emincmg/convo-lite)[ RSS](/packages/emincmg-convo-lite/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

 [![convo-lite-logo](convo-lite.png)](convo-lite.png)

Convo Lite is a package that allows you to easily create and manage chat rooms in your Laravel application. This package enables your users to communicate with each other.

Installation
============

[](#installation)

### Include the package

[](#include-the-package)

You can include Convo Lite in your project using composer:

```
composer require emincmg/convo-lite
```

### Migrate

[](#migrate)

Run the migrations to create the necessary database tables:

```
php artisan migrate
```

Publish the package's publishable files by running the following command:

```
php artisan vendor:publish --provider="Emincmg\ConvoLite\Providers\ConversationServiceProvider"
```

This will publish the migration fies to your applications `database/migrations` folder, and config file to your applications `config` folder.

Configuration
=============

[](#configuration)

### Changing Default Model

[](#changing-default-model)

You can change the default model for creating conversations between them through `config/convo-lite.php`

config file should be already published upon triggering `vendor:publish` command

```
'user_model' => config('auth.providers.users.model','App\\Models\\User.php'),
```

This defaults to your applications default model, so you can change that or if you only change for this package change this field.

### Localization

[](#localization)

All translation files are published to `lang/vendor/convo-lite` folder and the language's abbreviation (e.g. /en for English).

```
return [
    'new_message_subject' => 'New message notification from :sender',
    'greeting' => 'Dear :name,',
    'new_message_line' => 'You\'ve got a new message from :sender.',
    'click_to_view' => 'Click the button below to view.',
    'view_details' => 'Details',
    'best_regards' => 'Best Regards,',
    'slack_message' => 'You\'ve got a new message from :sender.',
    'view_message' => 'View Message',
    'sms_message' => 'You\'ve got a new message from :sender.',
];
```

Usage
=====

[](#usage)

To start using Convo Lite, you can add some basic routes and controller methods to manage conversations and messages. Here is an example usage:

### Creating a conversation

[](#creating-a-conversation)

Receiver could be both integer or array if multiple. If multiple receiver provided, conversation will be created between them.

```
$senderId= 1;
$receiverIds = [2,3];

Convo::createConversation($senderId,$receiverIds);
```

This will return the conversation that has just been created;

```
[
    {
        "title": null,
        "updated_at": "2024-06-06T14:18:50.000000Z",
        "created_at": "2024-06-06T14:18:50.000000Z",
        "id": 1
    }
]
```

To set a title for conversation, you could either;

```
$conversation = Convo::getConversationById(1);
$conversation->setTitle('Test Title');
```

or just create the conversation with title included.

```
 Convo::createConversation($senderId,$receiverIds,'Test Title');
```

both will return the same thing;

```
[
    {
        "title": "Test Title",
        "updated_at": "2024-06-06T14:18:50.000000Z",
        "created_at": "2024-06-06T14:18:50.000000Z",
        "id": 1
    }
]
```

if multiple receivers are provided, response will be a collection of conversations that has been created.

### Get a conversation

[](#get-a-conversation)

```
$conversation = Convo::getConversationById(1);
```

### Add Participators

[](#add-participators)

You can attach participators to an existing conversation by;

```
$conversation = Convo::getConversationById(1);
$userId = 1;

Convo::addParticipators($conversation, $userIds)
```

or you can send only the ID of the conversation;

```
$conversationId = 1;
$userId = 1;

Convo::addParticipators($conversationId, $userId)
```

you can add multiple participators as well;

```
$conversationId = 1;
$userIds = [1,2,3,4];

Convo::addParticipators($conversationId, $userIds)
```

### Send Message

[](#send-message)

Send a message by facade (files are optional);

```
$conversationId = 1;
$message = Convo::sendMessage($conversationId,$user,'hello',$request->files());
```

or you can pass conversation instance directly.

```
$conversation = Convo::getConversationById(1);
$message = Convo::sendMessage($conversation,$user,'hello',$request->files());
```

### Get messages

[](#get-messages)

Get by conversation model

```
$conversation = Convo::getConversationById(1);
$messages = Convo::getMessagesByConversation($conversation);
```

or you can access its messages directly by conversation instance;

```
$conversation = Convo::getConversationById(1);
$conversation->messages;
```

Broadcasting
============

[](#broadcasting)

Convo Lite supports Broadcasting via events and listeners.

### Broadcasting Authorization

[](#broadcasting-authorization)

Events are broadcasted to the private channels of the users : `user + id (eg user.1)` . I recommend using Laravel Reverb on the backend along with Echo on the frontend for fast &amp; secure implementation. Check out their [Documentation here](https://laravel.com/docs/11.x/reverb)

### Queues

[](#queues)

Events are pushed to the `queues` specified in the `config/convo-lite.php` file

```
'queues' => [
'mail' => 'convo-lite.mail',
'broadcast' => 'convo-lite.broadcast',
'slack' => 'convo-lite.slack',
'nexmo' => 'convo-lite.nexmo',
],
```

In order to process the events that got triggered, you should start your workers like this;

```
php artisan queue:work --queue=convo-lite.mail,convo-lite.broadcast,default
```

For broadcasting to work, `default` queue worker should be always started.

Vue Frontend
============

[](#vue-frontend)

Convo Lite includes ready-to-use Vue 3 components for a complete chat interface.

### Publishing Vue Components

[](#publishing-vue-components)

```
php artisan vendor:publish --tag=convo-lite-vue
```

This will publish:

- `resources/js/components/ConvoLite/` - Vue components
- `resources/js/composables/useConvo.js` - Composable for API calls
- `resources/js/convo-lite.js` - Entry point

### Basic Usage

[](#basic-usage)

```

import { ConvoChat } from './convo-lite'

const userId = 1 // Current authenticated user ID

```

### Using as Vue Plugin

[](#using-as-vue-plugin)

```
// app.js
import { createApp } from 'vue'
import ConvoLite from './convo-lite'

const app = createApp(App)
app.use(ConvoLite, { prefix: 'Convo' })
app.mount('#app')
```

Then use components globally:

```

```

### Using the Composable

[](#using-the-composable)

```
import { useConvo } from './composables/useConvo'

const {
  conversations,
  messages,
  loading,
  fetchConversations,
  sendMessage,
  addReaction
} = useConvo({ baseUrl: '/api/convo-lite' })

// Fetch conversations
await fetchConversations()

// Send a message
await sendMessage(conversationId, 'Hello!', [], replyToId)
```

### Available Components

[](#available-components)

ComponentDescription`ConvoChat`Full chat interface with sidebar and chat window`ConversationList`List of conversations`ChatWindow`Message display and input area`MessageItem`Single message bubble`MessageInput`Text input with file attachment`TypingIndicator`Typing animation`OnlineIndicator`Online status dot### Broadcasting Setup

[](#broadcasting-setup)

Add these channel definitions to your `routes/channels.php`:

```
Broadcast::channel('user.{id}', function ($user, $id) {
    return (int) $user->id === (int) $id;
});

Broadcast::channel('convo-lite.online', function ($user) {
    return ['id' => $user->id, 'name' => $user->name];
});
```

### Styling

[](#styling)

Components use Tailwind CSS classes. Make sure Tailwind is configured in your project, or override styles as needed.

API Endpoints
=============

[](#api-endpoints)

The package provides these REST endpoints (prefix: `/api/convo-lite`):

MethodEndpointDescriptionGET`/conversations`List user's conversationsPOST`/conversations`Create new conversationGET`/conversations/{id}/messages`Get messages (paginated)POST`/conversations/{id}/messages`Send messagePOST`/conversations/{id}/typing`Broadcast typing statusPUT`/messages/{id}`Edit messageDELETE`/messages/{id}`Delete messagePOST`/messages/{id}/read`Mark as readPOST`/messages/{id}/reactions`Add reactionDELETE`/messages/{id}/reactions`Remove reactionLicence
=======

[](#licence)

Convo Lite is open-source software licensed under the [MIT license](LICENSE).

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance64

Regular maintenance activity

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

2

Last Release

538d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a4bfdac9787d55beb7b009b9a9ad07dad4fe87a7484ee3b8814e39816bf8c4d7?d=identicon)[Emincmg](/maintainers/Emincmg)

---

Top Contributors

[![Emincmg](https://avatars.githubusercontent.com/u/106166521?v=4)](https://github.com/Emincmg "Emincmg (128 commits)")

### Embed Badge

![Health badge](/badges/emincmg-convo-lite/health.svg)

```
[![Health](https://phpackages.com/badges/emincmg-convo-lite/health.svg)](https://phpackages.com/packages/emincmg-convo-lite)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
