https://github.com/miracuthbert/laravel-multi-tenancy
A single database and multi-database multi-tenancy package for Laravel 5.8 and up
https://github.com/miracuthbert/laravel-multi-tenancy
laravel multi-database-multi-tenancy multi-tenancy single-database-multi-tenancy
Last synced: 2 months ago
JSON representation
A single database and multi-database multi-tenancy package for Laravel 5.8 and up
- Host: GitHub
- URL: https://github.com/miracuthbert/laravel-multi-tenancy
- Owner: miracuthbert
- License: gpl-3.0
- Created: 2020-02-09T13:16:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T14:53:38.000Z (about 2 years ago)
- Last Synced: 2025-12-14T12:57:09.202Z (6 months ago)
- Topics: laravel, multi-database-multi-tenancy, multi-tenancy, single-database-multi-tenancy
- Language: PHP
- Size: 667 KB
- Stars: 16
- Watchers: 1
- Forks: 2
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Multi-Tenancy
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](https://miracuthbert.github.io/laravel-multi-tenancy).
## 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
```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` and `migration` 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](https://miracuthbert.github.io/laravel-multi-tenancy).
## Security Vulnerabilities
If you discover a security vulnerability, please send an e-mail to Cuthbert Mirambo via [miracuthbert@gmail.com](mailto:miracuthbert@gmail.com). All security vulnerabilities will be promptly addressed.
## Credits
- [Cuthbert Mirambo](https://github.com/miracuthbert)
## License
Laravel Multi-Tenancy is licensed under GPL-3.0-only. Please see the license file for more information.