{"id":13396021,"url":"https://github.com/tenancy/multi-tenant","last_synced_at":"2025-05-13T22:02:14.380Z","repository":{"id":35323577,"uuid":"39585488","full_name":"tenancy/multi-tenant","owner":"tenancy","description":"Run multiple websites using the same Laravel installation while keeping tenant specific data separated for fully independent multi-domain setups, previously github.com/hyn/multi-tenant","archived":false,"fork":false,"pushed_at":"2024-05-11T16:32:40.000Z","size":1586,"stargazers_count":2584,"open_issues_count":76,"forks_count":396,"subscribers_count":85,"default_branch":"5.x","last_synced_at":"2025-05-06T21:05:40.439Z","etag":null,"topics":["hacktoberfest","laravel","multi-domain","multi-tenancy","multi-tenant","saas","tenancy","tenant"],"latest_commit_sha":null,"homepage":"https://tenancy.dev","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tenancy.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["tenancy"],"patreon":null,"open_collective":"tenancy","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-07-23T18:48:06.000Z","updated_at":"2025-05-05T06:44:55.000Z","dependencies_parsed_at":"2022-07-20T12:17:17.525Z","dependency_job_id":"a22ccbc9-36f7-44a8-b10e-0fe274f0daad","html_url":"https://github.com/tenancy/multi-tenant","commit_stats":{"total_commits":806,"total_committers":61,"mean_commits":13.21311475409836,"dds":0.5769230769230769,"last_synced_commit":"2beff8fbe999957050bf9e82904ca637b3256c26"},"previous_names":["hyn/multi-tenant"],"tags_count":131,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenancy%2Fmulti-tenant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenancy%2Fmulti-tenant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenancy%2Fmulti-tenant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tenancy%2Fmulti-tenant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tenancy","download_url":"https://codeload.github.com/tenancy/multi-tenant/tar.gz/refs/heads/5.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253702147,"owners_count":21949926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","laravel","multi-domain","multi-tenancy","multi-tenant","saas","tenancy","tenant"],"created_at":"2024-07-30T18:00:37.842Z","updated_at":"2025-05-13T22:02:14.344Z","avatar_url":"https://github.com/tenancy.png","language":"PHP","funding_links":["https://github.com/sponsors/tenancy","https://opencollective.com/tenancy"],"categories":["Popular Packages","PHP"],"sub_categories":[],"readme":"[![Packagist](https://img.shields.io/packagist/v/hyn/multi-tenant.svg)](https://packagist.org/packages/hyn/multi-tenant)\n[![build status](https://circleci.com/gh/tenancy/multi-tenant.svg?style=svg)](https://circleci.com/gh/tenancy/multi-tenant)\n[![codecov](https://codecov.io/gh/tenancy/multi-tenant/branch/5.x/graph/badge.svg)](https://codecov.io/gh/tenancy/multi-tenant/branch/5.x)\n[![Packagist](https://img.shields.io/packagist/dt/hyn/multi-tenant.svg)](https://packagist.org/packages/hyn/multi-tenant)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ac3e21d7a5f64e3f87f64c4913c1ca09?branch=4.x)](https://www.codacy.com/app/Luceos/multi-tenant)\n[![Join our Discord server](https://discordapp.com/api/guilds/146267795754057729/embed.png)](https://tenancy.dev/chat)\n[![Mentioned in Awesome Laravel](https://awesome.re/mentioned-badge.svg)](https://github.com/chiraggude/awesome-laravel)\n\nThe unobtrusive Laravel package that makes your app multi tenant. Serving\nmultiple websites, each with one or more hostnames from the same codebase. But\nwith clear separation of assets, database and the ability to override logic per\ntenant.\n\nSuitable for marketing companies that like to re-use functionality\nfor different clients or start-ups building the next software as a\n service.\n\n---\n\nOffers:\n\n- Integration with the awesome Laravel framework.\n- Event driven, extensible architecture.\n- Close - optional - integration into the web server.\n- The ability to add tenant specific configs, code, routes etc.\n\nDatabase separation methods:\n\n- One system database and separated tenant databases (default).\n- Table prefixed in the system database.\n- Or .. manually, the way you want, by listening to an event.\n\n[Complete documentation](https://tenancy.dev) covers more than just the\n installation and configuration.\n\n## Requirements, recommended environment\n\n- Laravel 9.0+.\n- PHP 8.0+\n- Apache or Nginx.\n- MySQL, MariaDB, or PostgreSQL.\n\nPlease read the full [requirements in the documentation](https://tenancy.dev/docs/hyn/5.4/requirements).\n\n## Installation\n\n```bash\ncomposer require hyn/multi-tenant\n```\n\n### Automatic service registration\n\nUsing [auto discovery](https://medium.com/@taylorotwell/package-auto-discovery-in-laravel-5-5-ea9e3ab20518), the\ntenancy package will be auto detected by Laravel automatically.\n\n#### Manual service registration\n\nIn case you want to disable webserver integration or prefer manual integration,\nset the `dont-discover` in your application composer.json, like so:\n\n```json\n{\n    \"extra\": {\n        \"laravel\": {\n            \"dont-discover\": [\n                \"hyn/multi-tenant\"\n            ]\n        }\n    }\n}\n```\n\nIf you disable auto discovery you are able to configure the providers by yourself.\n\nRegister the service provider in your `config/app.php`:\n\n```php\n    'providers' =\u003e [\n        // [..]\n        // Hyn multi tenancy.\n        Hyn\\Tenancy\\Providers\\TenancyProvider::class,\n        // Hyn multi tenancy webserver integration.\n        Hyn\\Tenancy\\Providers\\WebserverProvider::class,\n    ],\n```\n\n### Deploy configuration\n\nFirst publish the configuration and migration files so you can modify it to your needs:\n\n```bash\nphp artisan vendor:publish --tag tenancy\n```\n\nOpen the `config/tenancy.php` and `config/webserver.php` file and modify to your needs.\n\n\u003e Make sure your system connection has been configured in `database.php`. In case you didn't override the system connection name the `default` connection is used.\n\nNow run:\n\n```bash\nphp artisan migrate --database=system\n```\n\nThis will run the required system database migrations.\n\n---\n\n## Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tenancy#backer)]\n\n\u003ca href=\"https://opencollective.com/tenancy#backers\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/tenancy/backers.svg?width=890\"\u003e\u003c/a\u003e\n\n\n## Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/tenancy#sponsor)]\n\n\u003ca href=\"https://opencollective.com/tenancy/sponsor/0/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/tenancy/sponsor/0/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/tenancy/sponsor/1/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/tenancy/sponsor/1/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/tenancy/sponsor/2/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/tenancy/sponsor/2/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/tenancy/sponsor/3/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/tenancy/sponsor/3/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/tenancy/sponsor/4/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/tenancy/sponsor/4/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/tenancy/sponsor/5/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/tenancy/sponsor/5/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/tenancy/sponsor/6/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/tenancy/sponsor/6/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/tenancy/sponsor/7/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/tenancy/sponsor/7/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/tenancy/sponsor/8/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/tenancy/sponsor/8/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/tenancy/sponsor/9/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/tenancy/sponsor/9/avatar.svg\"\u003e\u003c/a\u003e\n\n## Contributors\n\n[![](https://sourcerer.io/fame/luceos/hyn/multi-tenant/images/0)](https://sourcerer.io/fame/luceos/hyn/multi-tenant/links/0)[![](https://sourcerer.io/fame/luceos/hyn/multi-tenant/images/1)](https://sourcerer.io/fame/luceos/hyn/multi-tenant/links/1)[![](https://sourcerer.io/fame/luceos/hyn/multi-tenant/images/2)](https://sourcerer.io/fame/luceos/hyn/multi-tenant/links/2)[![](https://sourcerer.io/fame/luceos/hyn/multi-tenant/images/3)](https://sourcerer.io/fame/luceos/hyn/multi-tenant/links/3)[![](https://sourcerer.io/fame/luceos/hyn/multi-tenant/images/4)](https://sourcerer.io/fame/luceos/hyn/multi-tenant/links/4)[![](https://sourcerer.io/fame/luceos/hyn/multi-tenant/images/5)](https://sourcerer.io/fame/luceos/hyn/multi-tenant/links/5)[![](https://sourcerer.io/fame/luceos/hyn/multi-tenant/images/6)](https://sourcerer.io/fame/luceos/hyn/multi-tenant/links/6)[![](https://sourcerer.io/fame/luceos/hyn/multi-tenant/images/7)](https://sourcerer.io/fame/luceos/hyn/multi-tenant/links/7)\n\n---\n\n## License and contributing\n\nThis package is offered under the [MIT license](license.md). In case you're interested at\ncontributing, make sure to read the [contributing guidelines](.github/CONTRIBUTING.md).\n\n### Testing\n\nRun tests using:\n\n```bash\nvendor/bin/phpunit\n```\n\nIf using MySQL, use:\n\n```bash\nLIMIT_UUID_LENGTH_32=1 vendor/bin/phpunit\n```\n\n\n\u003e Please be warned running tests will reset your current application completely, dropping tenant and system\ndatabases and removing the tenancy.json file inside the Laravel directory.\n\n## Changes\n\nAll changes are covered in the [changelog](changelog.md).\n\n## Contact\n\nGet in touch personally using;\n\n- The email address provided in the [composer.json](composer.json).\n- [Discord chat](https://tenancy.dev/chat).\n- [Twitter](http://twitter.com/laraveltenancy).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftenancy%2Fmulti-tenant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftenancy%2Fmulti-tenant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftenancy%2Fmulti-tenant/lists"}