Download the PHP package manggala/tenancy without Composer

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

manggala/tenancy (tenancy)

Latest Release PHP Version Laravel Version

manggala/tenancy adalah Headless Multi-Tenancy Engine serbaguna dan fleksibel untuk aplikasi SaaS Laravel.

Package ini mendukung 3 mode isolasi (Single-DB Row Scoping, Multi-DB Database-per-Tenant, dan Hybrid Mode) dengan 4 metode resolusi tenant otomatis (Subdomain, Custom Domain, HTTP Header, & Path).


๐ŸŒŸ Fitur Utama

  1. Dual & Hybrid Isolation Engine:
    • Single-DB Mode (Row-Level Security): Trait BelongsToTenant & TenantScope otomatis menyuntikkan WHERE tenant_id = 'xxx' dan mengisi tenant_id secara transparan.
    • Multi-DB Mode (Database-per-Tenant): Mengubah koneksi PDO & mereset database connection secara runtime.
    • Hybrid Mode: Single-DB untuk Tier Standard, Multi-DB terpisah untuk Tier Enterprise.
  2. 4 Resolusi Tenant Automatic:
    • Subdomain (acme.app.com)
    • Custom Domain (portal.acmecorp.com)
    • HTTP Header (X-Tenant-ID: acme โ€” untuk REST API & Mobile Apps)
    • Path (app.com/t/acme)
  3. Runtime Resource Bootstrappers:
    • Isolasi Storage (storage/app/tenants/{tenant_id}/)
    • Isolasi Cache & Redis (tenant:{tenant_id}:)
    • Isolasi File Log (storage/logs/tenant-{tenant_id}.log)
  4. Safe Context Switcher (Tenancy::runFor()):
    • Jalankan logika di dalam konteks tenant lain dengan aman, lalu otomatis kembali ke tenant asal.
  5. Tenant Quota & Feature Gates:
    • Sistem bawaan untuk membatasi kuota (max_users, max_storage) dan fitur tiering SaaS.
  6. 7 Artisan CLI Commands:
    • Suite perintah terminal lengkap (tenancy:install, tenant:create, tenant:migrate, tenant:seed, tenant:list, tenant:run, tenant:doctor).

๐Ÿ“‹ Matriks Kompatibilitas Framework & Stack

Parameter Dukungan Versi & Framework
Package Name manggala/tenancy
PHP Version ^8.2 || ^8.3 || ^8.4
Laravel Version (4 Major Versions) ^10.0 || ^11.0 || ^12.0 || ^13.0
Frontend Stack Support Blade, Livewire (v2/v3), Inertia React, Inertia Vue, REST API / Mobile Apps
Testing Suite Pest PHP (pestphp/pest)
Static Analysis PHPStan Level 5+ (larastan/larastan)

๐Ÿ“ฆ Instalasi

Pasang package via Composer:

Jalankan perintah instalasi otomatis untuk mempublikasikan file konfigurasi dan migrasi tabel central tenants:

Jalankan migrasi database:


โš™๏ธ Cara Penggunaan

1. Memilih Mode Isolasi (config/tenancy.php)

2. Memasang Trait pada Model (Single-DB Mode)

3. Mendaftarkan Middleware Resolusi Tenant

Daftarkan middleware pada grup route yang membutuhkan isolasi tenant:

Untuk REST API & Mobile Apps:

4. Menjalankan Kode dalam Konteks Tenant Lain

5. Memeriksa Fitur & Kuota Tenant


๐Ÿ–ฅ๏ธ Perintah Artisan CLI Suite (10 Perintah)

Package ini menyediakan 10 perintah terminal untuk mengelola tenant:

Perintah Deskripsi
php artisan tenancy:install Mempublikasikan config tenancy.php & file migrasi tenants.
php artisan tenant:create {name} --domain= --db= Membuat tenant baru (dan opsional DB terpisah).
php artisan tenant:delete {id} --drop-db --force Menghapus tenant dan opsional drop database.
php artisan tenant:migrate {--tenant=} Menjalankan migrate pada seluruh database tenant (Multi-DB).
php artisan tenant:rollback {--step=1} Rollback migrasi database pada seluruh database tenant.
php artisan tenant:seed {--class=DatabaseSeeder} Menjalankan database seeder ke seluruh tenant.
php artisan tenant:list Menampilkan daftar tenant terdaftar dalam tabel terminal.
php artisan tenant:run {tenant_id} "{command}" Menjalankan perintah artisan pada konteks tenant spesifik.
php artisan tenant:toggle {tenant_id} Mengaktifkan atau mensuspensi (suspend / activate) tenant.
php artisan tenant:doctor Tool diagnostik integritas koneksi DB, isolasi cache, & memory leaks.

๐Ÿงช Pengujian (Testing)

Jalankan pengujian menggunakan Pest PHP:

Jalankan analisis statis PHPStan:


๐Ÿ“„ Lisensi

Package ini berlisensi MIT License.


All versions of tenancy with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2 || ^8.3 || ^8.4
illuminate/support Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/database Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^10.0 || ^11.0 || ^12.0 || ^13.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 manggala/tenancy contains the following files

Loading the files please wait ...