miracuthbert / laravel-multi-tenancy
A single database and multi-database multi-tenancy package for Laravel 5.8 and up
Installs: 1 377
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 2
Forks: 2
Open Issues: 26
Requires
- php: ^7.3|^8.0
- illuminate/console: >=6.0
- illuminate/database: >=6.0
- illuminate/events: >=6.0
- illuminate/support: >=6.0
- webpatser/laravel-uuid: >=3.0
Requires (Dev)
- laravel/legacy-factories: >=1.0.4
- orchestra/testbench: >=4.0
- phpunit/phpunit: >=8.5
- dev-master
- 1.11.2
- 1.11.1
- 1.11.0
- 1.10.1
- 1.10.0
- 1.9.0
- 1.8.1
- 1.8.0
- 1.7.1
- 1.7.0
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.6.0-beta
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.0
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.1
- 1.2.0
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.0
- 0.0.3
- 0.0.2
- 0.0.1
- dev-dependabot/npm_and_yarn/express-4.19.2
- dev-dependabot/npm_and_yarn/follow-redirects-1.15.6
- dev-dependabot/npm_and_yarn/ip-1.1.9
- dev-dependabot/npm_and_yarn/minimist-and-mkdirp-1.2.8
- dev-dependabot/npm_and_yarn/http-cache-semantics-4.1.1
- dev-dependabot/npm_and_yarn/qs-6.5.3
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/terser-4.8.1
- dev-dependabot/npm_and_yarn/eventsource-1.1.1
- dev-dependabot/npm_and_yarn/async-2.6.4
- dev-dependabot/npm_and_yarn/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/prismjs-1.27.0
- dev-dependabot/npm_and_yarn/ajv-6.12.6
- dev-dependabot/npm_and_yarn/postcss-7.0.39
- dev-dependabot/npm_and_yarn/color-string-1.9.0
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/ws-6.2.2
- dev-dependabot/npm_and_yarn/dns-packet-1.3.4
- dev-dependabot/npm_and_yarn/browserslist-4.16.6
- dev-dependabot/npm_and_yarn/lodash-4.17.21
- dev-dependabot/npm_and_yarn/ssri-6.0.2
- dev-dependabot/npm_and_yarn/y18n-4.0.1
- dev-dependabot/npm_and_yarn/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/dot-prop-4.2.1
- dev-dependabot/composer/symfony/http-kernel-4.4.13
- dev-dependabot/npm_and_yarn/http-proxy-1.18.1
This package is auto-updated.
Last update: 2024-10-26 16:07:48 UTC
README
A single database and multi-database multi-tenancy package for Laravel 5.8 and up.
For the full installation, configuration and usage, see the Documentation.
Installation
You can install the package via composer:
composer require miracuthbert/laravel-multi-tenancy
Setup
The package takes advantage of Laravel Auto-Discovery, so it doesn't require you to manually add the ServiceProvider.
If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php
Miracuthbert\Multitenancy\LaravelMultiTenancyServiceProvider::class
Run the following command in your console: php artisan tenancy:setup
This will setup:
- The package config file
- The tenant routes file
- TenantDatabaseSeeder (by default used only by the
multi
driver) - Plus a tenant
model
andmigration
file if you passed a model name to the--model
option. See below for more.
You need to setup some of the required keys first in the
config/tenancy.php
file before migrating the database
See the Documentation.
Security Vulnerabilities
If you discover a security vulnerability, please send an e-mail to Cuthbert Mirambo via miracuthbert@gmail.com. All security vulnerabilities will be promptly addressed.
Credits
License
Laravel Multi-Tenancy is licensed under GPL-3.0-only. Please see the license file for more information.