Download the PHP package faraztanveer/laravel-chat without Composer

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

[![Latest Version](https://img.shields.io/packagist/v/faraztanveer/laravel-chat?style=for-the-badge&logo=packagist&logoColor=white)](https://packagist.org/packages/faraztanveer/laravel-chat) [![Downloads](https://img.shields.io/packagist/dt/faraztanveer/laravel-chat?style=for-the-badge&logo=packagist&logoColor=white)](https://packagist.org/packages/faraztanveer/laravel-chat) [![Monthly Downloads](https://img.shields.io/packagist/dm/faraztanveer/laravel-chat?style=for-the-badge&logo=packagist&logoColor=white)](https://packagist.org/packages/faraztanveer/laravel-chat) [![GitHub Stars](https://img.shields.io/github/stars/faraztanveer/laravel-chat?style=for-the-badge&logo=github&logoColor=white)](https://github.com/faraztanveer/laravel-chat) [![GitHub Forks](https://img.shields.io/github/forks/faraztanveer/laravel-chat?style=for-the-badge&logo=github&logoColor=white)](https://github.com/faraztanveer/laravel-chat) [![Code Style](https://img.shields.io/github/actions/workflow/status/faraztanveer/laravel-chat/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=for-the-badge&logo=php)](https://github.com/faraztanveer/laravel-chat/actions) [![PHP Version](https://img.shields.io/packagist/php-v/faraztanveer/laravel-chat?style=for-the-badge&logo=php&logoColor=white)](https://packagist.org/packages/faraztanveer/laravel-chat) [![Laravel Version](https://img.shields.io/badge/laravel-12+-FF2D20?style=for-the-badge&logo=laravel&logoColor=white)](https://laravel.com) [![License](https://img.shields.io/github/license/faraztanveer/laravel-chat?style=for-the-badge&logo=github&logoColor=white)](https://github.com/faraztanveer/laravel-chat/blob/main/LICENSE) [![Last Commit](https://img.shields.io/github/last-commit/faraztanveer/laravel-chat?style=for-the-badge&logo=github&logoColor=white)](https://github.com/faraztanveer/laravel-chat/commits) [![Made with Love](https://img.shields.io/badge/made%20with-❀️-red?style=for-the-badge)](https://github.com/faraztanveer/laravel-chat) **πŸš€ A blazingly fast, modern chat system for Laravel 12+** *Built for real-time applications, infinite customization, and developer happiness* [πŸ“¦ Installation](#-installation) β€’ [✨ Features](#-features) β€’ [βš™οΈ Quick Start](#%EF%B8%8F-quick-start) β€’ [πŸ“‘ API Reference](#-api-reference) β€’ [🀝 Contributing](#-contributing)


✨ Features

### 🎯 **Zero Configuration** - Works out of the box with sensible defaults - Auto-discovered database migrations - No complex setup required ### ⚑ **Lightning Fast** - Optimized database queries - Minimal performance overhead - Ready for real-time implementations
### πŸ”§ **Fully Customizable** - Use your existing models and rules - Extend functionality as needed - Clean, simple architecture ### πŸ›‘οΈ **Enterprise Ready** - Middleware-friendly design - Configurable API routes - Production-tested and reliable

πŸ’‘ Perfect for: Chat applications, messaging systems, customer support platforms, team collaboration tools, and any real-time communication needs.


πŸš€ Installation

πŸ“¦ Optional: Publish configuration file

βš™οΈ Quick Start

1️⃣ Setup Your User Model

Add the HasChatChannels trait to your user model:

2️⃣ Start Chatting!

That's it! Your application now has a fully functional chat system. The package provides RESTful API endpoints for all chat operations.


πŸŽ›οΈ Configuration

The package works seamlessly out of the box, but you can customize it to fit your needs.

Configuration file (config/laravel-chat.php):


πŸ“‘ API Reference

All endpoints are available under /api/{route_prefix} (default: /api/chat).

Method Endpoint Description Request Body/Parameters
POST /channel Create or retrieve a chat channel {"participant_id": 2}
GET /channels List user's chat channels –
GET /channel Get specific channel details ?channel_id=1
POST /message Send a message to channel {"channel_id": 1, "body": "Hello!"}
GET /messages Retrieve channel messages ?channel_id=1

Example Usage


🎨 Customization

Custom Display Names

Override the display name for chat participants:

Custom Participant Columns

Specify which columns to include in API responses:

Middleware Customization

You can customize authentication and authorization middleware in the configuration file:


πŸͺ Event Listeners & Extending Chat Actions

This package dispatches events when key chat actions occur, allowing you to react (broadcast, notify, etc) in your own appβ€”without modifying package code.

Listening for Chat Events

You may listen for chat events by creating listeners with Artisan:

When a chat channel is created or a message is stored, your listener's handle method will be called automatically with the corresponding Eloquent model.

Example: Message Stored Listener

Example: Channel Created Listener

Resource Classes

The package provides resource classes (e.g. MessageResource, ChatChannelResource) which convert your models into the same format as your API responses.

You can use these in your listeners for logging, broadcasting, or passing structured data to your frontendβ€”ensuring consistency between your API and event-driven features.

What You Get in Your Listener

That's it! Your app can now respond to every chat action, with models and resources consistent with your APIs. For advanced event usage, see the Laravel Events documentation.


🀝 Contributing

We welcome contributions! Here's how you can help make Laravel Chat even better:


πŸ›‘οΈ Security

Security is a top priority. If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

See SECURITY.md for our security policy and vulnerability reporting process.


πŸ“‹ Requirements


πŸ—ΊοΈ Roadmap


πŸ“œ License

This package is open-sourced software licensed under the MIT License.


πŸ‘¨β€πŸ’» Credits


**Built with ❀️ for the Laravel community** ⭐ **Star this repository if it helped you!** [πŸ› Report Bug](https://github.com/faraztanveer/laravel-chat/issues) β€’ [πŸ’‘ Request Feature](https://github.com/faraztanveer/laravel-chat/issues) β€’ [🐦 X](https://X.com/faraz_dev)

All versions of laravel-chat with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0||^12.0
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 faraztanveer/laravel-chat contains the following files

Loading the files please wait ...