Download the PHP package ronasit/laravel-chat without Composer

On this page you can find all versions of the php package ronasit/laravel-chat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-chat

Laravel Chat Plugin

Coverage Status

Table of Contents

Introduction

This plugin adds the ability for users to work with chat functionalities in a Laravel application.

Installation

  1. Install the package using the following command:

  2. Publish the package configuration:

  3. If you use non default App\Models\User model - update chat.classes.user_model config.

Integration with LaravelSwagger

This package includes an OpenAPI documentation file. To include it in your project's documentation, you need to register it in the auto-doc.additional_paths config:

vendor/ronasit/laravel-chat/documentation.json

API Endpoints

All routes are registered by default, you can change the route registration by calling Route::chat() in your routes file (e.g. routes/api.php):

All endpoints are using the current auth user context, so it critical to always wrap them into the auth middleware.

Conversations

Method URL Description
GET /conversations List all conversations the authenticated user is a member of.
GET /conversations/{id} Retrieve a single conversation by its ID.
DELETE /conversations/{id} Delete a conversation.
GET /users/{userId}/conversation Get the private conversation between the authenticated user and the specified user.

Messages

Method URL Description
GET /messages List of messages related to the current user's conversations.
POST /messages Create a new message.
POST /messages/{id}/read-to Mark all messages in the target message's conversation as read up to the specified message ID.
POST /messages/{id}/pin Pin a message to its conversation.
POST /messages/{id}/unpin Unpin a message from its conversation.

Broadcast Events

The package uses Laravel's broadcasting system to notify conversation members in real time. All events are delivered over private channels named chat.{userId}, where {userId} is the ID of the recipient.

Channel Authorization

A user may listen on only his own private channel chat.{userId}. The channel is authorized when the authenticated user's ID matches {userId}.

Events

conversation.created

Sent to all conversation members except the creator when a new conversation is created.

This event is triggered when:

Payload:


conversation.updated

Sent to all conversation members when a conversation is modified.

This event is triggered when:

Payload:


conversation.deleted

Sent to all conversation members except the user who deleted it when a conversation is removed.

This event is triggered when:

Payload:


message.created

Sent to all conversation members except the sender when a new message is posted.

This event is triggered when:

Payload:


message.updated

Sent to all conversation members when the read status of one or more messages changes.

This event is triggered when:

Payload:

Contributing

Thank you for considering contributing to the Laravel Chat plugin! The contribution guide can be found in the Contributing guide.

License

Laravel Chat plugin is open-sourced software licensed under the MIT license.


All versions of laravel-chat with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
laravel/framework Version >=12
ronasit/laravel-helpers Version >=3.7.2
ronasit/laravel-media Version >=0.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ronasit/laravel-chat contains the following files

Loading the files please wait ...