承接 nigr/chat 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nigr/chat

Composer 安装命令:

composer require nigr/chat

包简介

PHP chat library

README 文档

README

Install library:

    composer require nigr/dotenv:@dev

Get started:

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

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:

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

  • 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)

  • ["status" => true, "message" => "!", "data" => [];
  • ["status" => false, "message" => "!", "data" => [];

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-20