Download the PHP package metafroliclabs/laravel-chat without Composer

On this page you can find all versions of the php package metafroliclabs/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 Logo

Laravel Chat Package

A powerful and customizable chat system built for Laravel applications. This package supports private and group chats, media sharing, chat settings, user roles, activity messages, and more.

🚀 Features

📦 Installation

Or, manually publish configuration file:

Run migrations:

Make sure storage is linked:

⚙️ Configuration

Customize settings in config/chat.php:

1. Chat type:

You can switch between standard (private/group chat) and universal (global chat):

Also in universal type, you can enable/disable some modules:

2. Pagination:

Enable or disable pagination:

3. Activity Messages

Automatically generated for:

You can disable all activity messages globally:

4. User Model Configuration

Define how user information (name and avatar) is retrieved:

5. Rate Limiting

You can control how many chats a user can create and how many messages they can send per minute. These limits help prevent spam and abuse.

📡 Events in Laravel Chat

Laravel Chat dispatches events to help you hook into the system and extend functionality such as notifications, logging, analytics, and more.

🔥 Available Events

Metafroliclabs\LaravelChat\Events\MessageSent

Dispatched when a message is successfully sent in a chat.

Event Data:

⚙️ How to Use

Step 1: Create a Listener

Step 2: Handle the Event

🔧 Register the Listener

In your app/Providers/EventServiceProvider.php:

Then run:

🧠 Usage

📚 API Endpoints

All routes are prefixed by the config value chat.prefix (default: chat) and use the chat.middleware middleware group.

Middleware: auth:sanctum is required.

🔍 Chat List & Info

Method Endpoint Description
GET /all/list Get all chats for the user
GET /unread/list Get all unread chats
GET /unread/count Get unread chat count

🛠️ Chat Management

Method Endpoint Description
POST /create Create private chat
POST /create/group Create group chat
POST /{id}/update Update chat name/image/settings
POST /{id}/delete Delete a chat
POST /{id}/leave Leave group chat
POST /{id}/mute Mute/unmute chat
GET /{id} Chat detail

👥 User Management

Method Endpoint Description
GET /{id}/users Get all users in the chat
POST /{id}/users/add Add users to a group
POST /{id}/users/remove Remove users
POST /{id}/users/{uid}/admin Promote/demote user to/from admin

💬 Messaging

Method Endpoint Description
GET /{id}/messages Get all messages in a chat
POST /{id}/messages Send a new message
POST /{id}/messages/forward Forward messages
POST /{id}/messages/{mid}/update Update a message
POST /{id}/messages/{mid}/delete Delete a message

💖 Reactions & Views

Method Endpoint Description
GET /{id}/messages/{mid}/likes Get users who liked a message
POST /{id}/messages/{mid}/likes Like/unlike a message
GET /{id}/messages/{mid}/views Get users who viewed a message
POST /{id}/messages/{mid}/views Mark message as viewed

⚡ Rate Limiting

Some endpoints are rate limited to prevent abuse:

If a user exceeds these limits, a 429 Too Many Requests response will be returned by the API.

📄 License

This project is licensed under the MIT License.


All versions of laravel-chat with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
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 metafroliclabs/laravel-chat contains the following files

Loading the files please wait ....