Download the PHP package ananiaslitz/matrix without Composer

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

Matrix - Hyperf Multi-Tenant Library

Matrix is a comprehensive multi-tenant library designed to seamlessly integrate multi-tenancy into your Hyperf applications. It provides an easy-to-use and flexible system to manage multiple tenants, ensuring data isolation, dynamic database connection management, and tenant identification based on request parameters.

🌟 Features

🚀 Installation

To install Matrix, run the following command in the root of your Hyperf project:

After installation, you should publish the default migrations provided by Matrix:

This command copies necessary migration files to your project's migrations directory.

Configuration

  1. Publish Configuration (Optional): If you want to customize the tenant identification logic or use a custom TenantFinder, publish the Matrix configuration file:

This will copy the default configuration file to config/autoload/matrix.php.

  1. Define Tenant Finder: In config/autoload/matrix.php, specify your custom TenantFinder implementation if necessary:

  2. Middleware Registration: Register the TenantMiddleware in your application's middleware stack, typically in config/autoload/middlewares.php:

Usage

To use Matrix in your application, simply proceed with your business logic as usual. The library handles tenant identification and database connection switching automatically based on your configuration.

Ensure that your tenant-specific models use the dynamic tenant connection, which Matrix configures based on the identified tenant:

Customizing Tenant Identification

To customize how tenants are identified, implement your own TenantFinderInterface and specify it in the config/autoload/matrix.php configuration file. Your custom finder should return the tenant identifier based on the request, which Matrix will use to configure the database connection.

Contributing

Contributions are welcome! Please feel free to submit pull requests or create issues for bugs, questions, and feature requests.


All versions of matrix with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
hyperf/database Version ^3.0
hyperf/di Version ^3.0
hyperf/command Version ^3.0
hyperf/db-connection Version ^3.0
hyperf/context Version ^3.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 ananiaslitz/matrix contains the following files

Loading the files please wait ...