PHPackages                             nigr/chat - 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. nigr/chat

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

nigr/chat
=========

PHP chat library

08PHP

Since Oct 12Pushed 5mo agoCompare

[ Source](https://github.com/Reservoir-PHP/nigr-chat)[ Packagist](https://packagist.org/packages/nigr/chat)[ RSS](/packages/nigr-chat/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

Get started
-----------

[](#get-started)

### Install library:

[](#install-library)

```
    composer require nigr/dotenv:@dev
```

### Get started:

[](#get-started-1)

1. Add routes;
2. Create DB connection: ChatApi::setConnection($dsn, $username, $password);
3. Call necessary method

### Using routes:

[](#using-routes)

- 'GET' - "getChats"(get all chats or get defined chats by params),
- 'POST'- "createChat"(create chat),
- 'GET' - "getMessages"(get all messages or get defined messages by params),
- 'POST'- "createMessage"(create message)

### Prepare DB:

[](#prepare-db)

Chats:

- id: number
- lot\_id: number
- contractor\_id: number
- executor\_id: number
- created\_at?: timestamp
- updated\_at?: timestamp

Messages:

- id: number AI
- chat\_id: number
- owner: string
- text: string
- recipient?: string
- created\_at?: timestamp
- updated\_at?: timestamp

Data structure
--------------

[](#data-structure)

- chat get = id?, lot\_id?, contractor\_id?, executor\_id?
- chat post = lot\_id, contractor\_id, executor\_id,
- message get = id?, chat\_id?, owner?, text?, recipient?
- message post = chat\_id, owner, text, recipient?

Returned data(JSON)
-------------------

[](#returned-datajson)

- \["status" =&gt; true, "message" =&gt; "!", "data" =&gt; \[\];
- \["status" =&gt; false, "message" =&gt; "!", "data" =&gt; \[\];

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance49

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/79249769?v=4)[Владимир](/maintainers/NikitinVladimirV)[@NikitinVladimirV](https://github.com/NikitinVladimirV)

---

Top Contributors

[![NikitinVladimirV](https://avatars.githubusercontent.com/u/79249769?v=4)](https://github.com/NikitinVladimirV "NikitinVladimirV (35 commits)")

### Embed Badge

![Health badge](/badges/nigr-chat/health.svg)

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

###  Alternatives

[mundschenk-at/php-typography

A PHP library for improving your web typography

78979.3k21](/packages/mundschenk-at-php-typography)[langleyfoxall/math_eval

✖️➕➖➗ `math\_eval` safely evaluates mathematical expressions

43704.2k3](/packages/langleyfoxall-math-eval)[kjmtrue/vietnam-zone

VietNam Zone

3115.5k](/packages/kjmtrue-vietnam-zone)

PHPackages © 2026

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