PHPackages                             vns/chatting - 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. [API Development](/categories/api)
4. /
5. vns/chatting

ActiveLibrary[API Development](/categories/api)

vns/chatting
============

api for make chatting easy

0.3.0(3y ago)061MITPHPPHP ^7.4|^8.0

Since Oct 5Pushed 3y agoCompare

[ Source](https://github.com/vns-packages/vns-chat-api)[ Packagist](https://packagist.org/packages/vns/chatting)[ Docs](https://github.com/vns/chatting-backend)[ RSS](/packages/vns-chatting/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (4)Versions (6)Used By (0)

Chatting api package
====================

[](#chatting-api-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/11a23ee88ad06eaad71718aea29cf75c8da1b114d09695d06cb58d441bd099f5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f766e732f6368617474696e672d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vns/chatting-api)[![Total Downloads](https://camo.githubusercontent.com/963435d47b3c565bde90e68afb7978d95296816e79c31f4720ac19bc4757c945/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f766e732f6368617474696e672d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vns/chatting-api)[![GitHub Actions](https://github.com/vns/chatting-api/actions/workflows/main.yml/badge.svg)](https://github.com/vns/chatting-api/actions/workflows/main.yml/badge.svg)

small package to do task of any chatting task like manage conversations, messages, participants, ...

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require vns/chatting-api
```

Usage
-----

[](#usage)

First You Must Publish migrations

```
php artisan vendor:publish --provider="VnsChattingApi\ChattingApiServiceProvider" --tag="migrations"
```

Publish config file

```
php artisan vendor:publish --provider="VnsChattingApi\ChattingApiServiceProvider" --tag="config"
```

Add Messageable Trait for participant model

```
use VnsChattingApi\Traits\Messageable;
```

Manage Conversation
-------------------

[](#manage-conversation)

```
// Create new Conversation
ChattingApiFacade::createConversation([$model1,$model2]); // create un-direct conversation
ChattingApiFacade::createDirectConversation([$model1,$model2]); // create direct conversation

// Get conversation by id
ChattingApiFacade::conversations()->getById($conversation_id);

// Get conversation messages
ChattingApiFacade::conversation($conversation)->setParticipant($participant)
            ->setPaginationParams([
                'page' => 1,
                'perPage' => 25,
                'sorting' => "desc",
                'columns' => [
                    '*'
                ],
                'pageName' => 'page'
            ])
            ->page($page)
            ->getMessages();

// OR

$participant->conversations;

// Get Count of unread messages for conversations for specific participant
ChattingApiFacade::conversation($conversation)->setParticipant($participant)->unreadCount();

// Get Conversation between two participant
ChattingApiFacade::conversations()->between( $participantOne,  $participantTwo);

// Clear all message notifications for one participant
ChattingApiFacade::conversations()->setParticipant($participant)->clear();

// Make all Messages as read by specific participant
ChattingApiFacade::conversations()->setParticipant($participant)->readAll();

// Add new participants for conversation
ChattingApiFacade::conversation($conversation)->addParticipants($participants);

// Remove participants from conversation
ChattingApiFacade::conversation($conversation)->removeParticipants($participants);
```

### conversations api

[](#conversations-api)

Manage Participant
------------------

[](#manage-participant)

```
// added Messageable Trait for participant model
use VnsChattingApi\Traits\Messageable;

// Get all conversations for participant
$participant->conversations();

// Join Conversation
$participant->joinConversation($conversation);

// leave Conversation
$participant->leaveConversation($conversation);
```

Manage Message
--------------

[](#manage-message)

```
// Create new Message
ChattingApiFacade::message('message content')
        ->from($participant)
        ->to($conversation)
        ->send();

// Or

ChattingApiFacade::message('message content')
    ->from($participant)
    ->to($conversation)
    ->type('text')
    ->send();

// Delete Message For Specific Participant
ChattingApiFacade::messages()->getById($message_id)->trash($participant);
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

5

Last Release

1308d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e53fe5c46ae79bf386700e8af3146e6a380be9e1592efdc29bcee6565917d786?d=identicon)[naif-sameer](/maintainers/naif-sameer)

---

Top Contributors

[![naif-sameer](https://avatars.githubusercontent.com/u/42966227?v=4)](https://github.com/naif-sameer "naif-sameer (9 commits)")

---

Tags

chattingvns

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vns-chatting/health.svg)

```
[![Health](https://phpackages.com/badges/vns-chatting/health.svg)](https://phpackages.com/packages/vns-chatting)
```

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[spatie/laravel-route-discovery

Auto register routes using PHP attributes

23645.0k2](/packages/spatie-laravel-route-discovery)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[didww/didww-api-3-php-sdk

PHP SDK for DIDWW API 3

1218.2k](/packages/didww-didww-api-3-php-sdk)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

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