Download the PHP package achalj09/multi-tenant without Composer
On this page you can find all versions of the php package achalj09/multi-tenant. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download achalj09/multi-tenant
More information about achalj09/multi-tenant
Files in achalj09/multi-tenant
Package multi-tenant
Short Description Run multiple websites using the same laravel installation while keeping tenant specific data separated for fully independant multi-domain setups.
License MIT
Informations about the package multi-tenant
The unobtrusive Laravel package that makes your app multi tenant. Serving multiple websites, each with one or more hostnames from the same codebase. But with clear separation of assets, database and the ability to override logic per tenant.
Suitable for marketing companies that like to re-use functionality for different clients or start-ups building the next software as a service.
Offers:
- Integration with the awesome Laravel framework.
- Event driven, extensible architecture.
- Close - optional - integration into the web server.
- The ability to add tenant specific configs, code, routes etc.
Database separation methods:
- One system database and separated tenant databases (default).
- Table prefixed in the system database.
- Or .. manually, the way you want, by listening to an event.
Complete documentation covers more than just the installation and configuration.
Requirements, recommended environment
- Laravel 8.0+.
- PHP 7.3+
- Apache or Nginx.
- MySQL, MariaDB, or PostgreSQL.
Please read the full requirements in the documentation.
Installation
Automatic service registration
Using auto discovery, the tenancy package will be auto detected by Laravel automatically.
Manual service registration
In case you want to disable webserver integration or prefer manual integration,
set the dont-discover
in your application composer.json, like so:
If you disable auto discovery you are able to configure the providers by yourself.
Register the service provider in your config/app.php
:
Deploy configuration
First publish the configuration and migration files so you can modify it to your needs:
Open the config/tenancy.php
and config/webserver.php
file and modify to your needs.
Make sure your system connection has been configured in
database.php
. In case you didn't override the system connection name thedefault
connection is used.
Now run:
This will run the required system database migrations.
Backers
Thank you to all our backers! 🙏 [Become a backer]
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
Contributors
License and contributing
This package is offered under the contributing guidelines.
Testing
Run tests using:
If using MySQL, use:
Please be warned running tests will reset your current application completely, dropping tenant and system databases and removing the tenancy.json file inside the Laravel directory.
Changes
All changes are covered in the changelog.
Contact
Get in touch personally using;
- The email address provided in the composer.json.
- Discord chat.
- Twitter.
All versions of multi-tenant with dependencies
phpseclib/phpseclib Version ~2.0
doctrine/dbal Version ~2.5|~3.0
ramsey/uuid Version ^4.0
laravel/framework Version ^8.0